[R] Consistent behaviour of for-loop

2010-04-15 Thread Uwe Dippel
First my excuses if I keep bugging everyone in this list, but I am a newbie, and tend to find some behaviour that looks unexpected to me; and I would really appreciate to be pointed to some location that allows me to understand more about this software. Here is my next question:

Re: [R] Consistent behaviour of for-loop

2010-04-15 Thread Peter Ehlers
On 2010-04-15 2:10, Uwe Dippel wrote: First my excuses if I keep bugging everyone in this list, but I am a newbie, and tend to find some behaviour that looks unexpected to me; and I would really appreciate to be pointed to some location that allows me to understand more about this software. Here

Re: [R] Consistent behaviour of for-loop

2010-04-15 Thread Uwe Dippel
Peter Ehlers wrote: par(mfrow=c(1,1)) qqnorm(rnorm(20)) qqmath(rnorm(20)) par(mfrow=c(3,4)) for(i in 1:12)qqnorm(rnorm(20)) Until here everything works as expected, and the last line prints 12 samples of qqnorm. However, for(i in 1:12)qqmath(rnorm(20)) is doing nothing at all.

Re: [R] Consistent behaviour of for-loop

2010-04-15 Thread Peter Ehlers
On 2010-04-15 4:03, Uwe Dippel wrote: Peter Ehlers wrote: par(mfrow=c(1,1)) qqnorm(rnorm(20)) qqmath(rnorm(20)) par(mfrow=c(3,4)) for(i in 1:12)qqnorm(rnorm(20)) Until here everything works as expected, and the last line prints 12 samples of qqnorm. However, for(i in

Re: [R] Consistent behaviour of for-loop

2010-04-15 Thread Uwe Dippel
Peter Ehlers wrote: You are mixing 'traditional' graphics (par(...)) and 'lattice' graphics. That won't work. In lattice, you use the 'layout' argument to select the number of columns/rows. This is easiest if you set up a conditioning variable: cond - gl(12, 20, labels = letters[1:12]) x -

Re: [R] Consistent behaviour of for-loop

2010-04-15 Thread Peter Ehlers
On 2010-04-15 5:00, Uwe Dippel wrote: Peter Ehlers wrote: You are mixing 'traditional' graphics (par(...)) and 'lattice' graphics. That won't work. In lattice, you use the 'layout' argument to select the number of columns/rows. This is easiest if you set up a conditioning variable: cond -

Re: [R] Consistent behaviour of for-loop

2010-04-15 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 15.04.2010 13:00:57: Peter Ehlers wrote: You are mixing 'traditional' graphics (par(...)) and 'lattice' graphics. That won't work. In lattice, you use the 'layout' argument to select the number of columns/rows. This is easiest if you set up a

Re: [R] Consistent behaviour of for-loop

2010-04-15 Thread Greg Snow
] On Behalf Of Uwe Dippel Sent: Thursday, April 15, 2010 5:01 AM To: Peter Ehlers Cc: r-help@r-project.org Subject: Re: [R] Consistent behaviour of for-loop Peter Ehlers wrote: You are mixing 'traditional' graphics (par(...)) and 'lattice' graphics. That won't work. In lattice, you use

Re: [R] Consistent behaviour of for-loop [Solved]

2010-04-15 Thread Uwe Dippel
Greg Snow wrote: The first thing to do is look at the help page for the function: ?qqnorm and ?qqmath, the package where these functions are defined is at the top of the page, if that package is graphics then it is a base graphics function, if the package is grid, lattice, or ggplot2 then it is