[R] "Groups" in XYPLOT
    Thomas Colson 
    tpcolson at ncsu.edu
       
    Sun Mar 18 06:03:36 CET 2007
    
    
  
 
The make.groups function did the trick. Thank you so much for the seemingly
obvious solution!
piedfac <- read.table("C:/R_PLots/piedmontfacfreqs.txt", header=TRUE,
sep=",", na.strings="NA", dec=".", strip.white=TRUE)
coastfac <- read.table("C:/R_PLots/coastalfacfreqs.txt", header=TRUE,
sep=",", na.strings="NA", dec=".", strip.white=TRUE)
fac<-make.groups(piedfac,coastfac)
xyplot(fac$rank.PRank~fac$basin_area,groups=fac$which,scales=list(y=list(log
=TRUE,at=c(.0001,.001,.01,.1,1)),x=list(log=TRUE,at=c(10,100,1000,10000,1000
00,1000000))),xlab="Drainage Area m^2",ylab="P(A>A*)")
 
Thomas Colson, PhD
North Carolina State University
Department of Forestry and Environmental Resources
(919)673-8023
tpcolson at hotmail.com
Schedule: www4.ncsu.edu/~tpcolson   
-----Original Message-----
From: Deepayan Sarkar [mailto:deepayan.sarkar at gmail.com] 
Sent: Saturday, March 17, 2007 11:19 PM
To: Thomas Colson
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] "Groups" in XYPLOT
On 3/17/07, Thomas Colson <tpcolson at ncsu.edu> wrote:
>  Thanks for the warning:
> Here is the link to the datasets, rather large at 2 and 5 mb. Another 
> note is that one set has more datapoints than the other, don't know if 
> this can be done with xyplot.
As long as the two datasets have the same column name, you should be able to
use the 'make.groups' function to combine them. The resulting data frame
should have a column called 'which' identifying the origin.
Deepayan
    
    
More information about the R-help
mailing list