Displaying 1 result from an estimated 1 matches for "fam_".
Did you mean:
fam
2012 Oct 31
2
how can xyplot word when with for control flow
...tell me where my code is wrong and how can make the
code right?
Thanks.
Best regards
Yuanzhen Lin
Code:
library("lattice")
plot.data$Fam<-as.numeric(plot.data$Fam)
#### xyplot can work if one by one in Fam ####
plot3.data<-subset(plot.data,Fam==1)
heading=paste("Fam_",1)
xyplot(rank ~ ca, data=plot3.data, groups=Spacing,
type="o",main=heading)
###### the following code for control flow doesn't work ####
for (i in 1:3){
plot3.data<-subset(plot.data,Fam==i)
heading=paste("Fam_",i)
xyplot(rank ~ ca, data=plot3.data...