An embedded and charset-unspecified text was scrubbed... Name: nem el?rhet? URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100423/4fa9275f/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: nem el?rhet? URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100423/717eaf0d/attachment.pl>
On Apr 23, 2010, at 4:57 PM, tamas barjak wrote:> Hi All! > > I have 2 plain questions: > > 1.) I know that very primitive question, but that to grant it, that > the drawing > on the screen divided up onto which part draw > > for example: > > layout(matrix(1:4,ncol=2, byrow=T)) > > plot(x, y, ...) <--- 1. screen > > plot(y, z, ...) <--- 3. screen > > plot(z, x, ...) <--- 2. screen?locator # for getting screen coordinate ?points # for plotting> > etc... > > 2.) > > How I can fix it and to insert the random numbers in order for him to > generate them later > > for example: > > a<-runif(100) > > and to insert these here---> rnorm(100, 0, 1) > > Thank you!-- David Winsemius, MD West Hartford, CT
An embedded and charset-unspecified text was scrubbed... Name: nem el?rhet? URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100424/7df6ffb2/attachment.pl>
On 04/24/2010 02:52 AM, tamas barjak wrote:> Hi All! > > I have 2 plain questions: > > 1.) > I know that very primitive question, but that to grant it, that the drawing > on the screen divided up onto which part draw > > for example: > > > layout(matrix(1:4,ncol=2, byrow=T)) > > plot(x, y, ...)<--- 1. screen > > plot(y, z, ...)<--- 2. screen > > etc... > > 2.) > > How I can fix it and to insert the random numbers in order for him to > generate them later > > for example: > > a<-runif(100) > > and to insert these here---> rnorm(100, 0, 1) >Hi Tamas, I may not understand what you are asking, but take a look at the example for the "panes" function in the plotrix package. Jim
If I understand it correctly par(mfrow=c(2,2)) plot(x,y) plot(y,z) ..... should work. On Apr 24, 2010, at 8:11 AM, Jim Lemon wrote:> On 04/24/2010 02:52 AM, tamas barjak wrote: >> Hi All! >> >> I have 2 plain questions: >> >> 1.) >> I know that very primitive question, but that to grant it, that the >> drawing >> on the screen divided up onto which part draw >> >> for example: >> >> >> layout(matrix(1:4,ncol=2, byrow=T)) >> >> plot(x, y, ...)<--- 1. screen >> >> plot(y, z, ...)<--- 2. screen >> >> etc... >> >> 2.) >> >> How I can fix it and to insert the random numbers in order for him to >> generate them later >> >> for example: >> >> a<-runif(100) >> >> and to insert these here---> rnorm(100, 0, 1) >> > Hi Tamas, > I may not understand what you are asking, but take a look at the > example for the "panes" function in the plotrix package. > Jim > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
An embedded and charset-unspecified text was scrubbed... Name: nem el?rhet? URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100424/755e0a2c/attachment.pl>
A couple of additions to the suggestions that you have already received: 1. you can use par(mfrow=c(r,c)) to set up the plotting areas, then us par(mfg=c(r,c)) to tell R which frame to plot into. 2. you could start with an empty plot and use the subplot function (TeachingDemos package) to place each plot exactly where you want. 3. you can use layout, just create the matrix with the numbers representing the order you want to plot. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of tamas barjak > Sent: Friday, April 23, 2010 2:58 PM > To: r-help at r-project.org > Subject: [R] 2 simple question > > Hi All! > > I have 2 plain questions: > > 1.) > I know that very primitive question, but that to grant it, that the > drawing > on the screen divided up onto which part draw > > for example: > > > layout(matrix(1:4,ncol=2, byrow=T)) > > plot(x, y, ...) <--- 1. screen > > plot(y, z, ...) <--- 3. screen > > plot(z, x, ...) <--- 2. screen > > etc... > > 2.) > > How I can fix it and to insert the random numbers in order for him to > generate them later > > for example: > > a<-runif(100) > > and to insert these here---> rnorm(100, 0, 1) > > Thank you! > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code.