Hi Ivan,
You can get your first plot this way:

plot(test$SILIKATG, ylim=c(0,0.02), type="l",xaxt="n",xlab="Group")
axis(1,at=c(5,10,15,20),labels=sort(unique(test$DIET)))

I was going to suggest using reshape to get the following matrix, but I just couldn't work out how to do it.

test.wide<-cbind(test$SILIKATG[test$DIET=="G"],
 test$SILIKATG[test$DIET=="GG"],
 test$SILIKATG[test$DIET=="L"],
 test$SILIKATG[test$DIET=="LG"])
matplot(test.wide,pch="")
text(rep(1:5,4),test.wide,rep(c("G","GG","L","LG"),each=5),
 col=rep(2:5,each=5))

Jim

______________________________________________
R-help@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.

Reply via email to