[R] a loop for boxplot graphs

From: James Lenihan <jameslenihan_at_sbcglobal.net>
Date: Sun, 29 Mar 2009 14:08:35 -0700 (PDT)

Dear Colleagues
 

I have the following code that generates a boxplot for one specific labtest:
 

boxplot.n(LBSTRESN~COHORT, main="Boxplot of laboratory data for XLXXX-XXX test=Creatinine", subset = LBTEST=="Creatinine",
xlab = "Cohort Number",
ylab = "Units = umol/L",
varwidth=TRUE
 

I would like to know if there is a way to loop through the dataset and produce the boxplot for a number of specific labtest.
 

Looking at the documentation for loops I can't see how I would change the "ylab","main"and "subset"  
 

Can someone refer me to a similar example in the online documentation?
 


Thanks,
 
 

Jim L 

        [[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. Received on Sun 29 Mar 2009 - 20:11:24 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 29 Mar 2009 - 21:30:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive