On 01/12/2010 12:41 AM, Carl-Göran CG. Pettersson wrote:
Thanks a lot for the quick response!
The suggested code worked fine up to a certain point: the actual plotting from
the datasets...
With the sample dataset in "samp" my code looks like this at the end:
for(cultivar in 1:6)
+ boxplot(unlist(samp[samp$cn==cultivar[cultivar],]),
+ add=TRUE,at=cultivar)
There were 12 warnings (use warnings() to see them)
warnings()
Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf
.
.
.
.
.
What is happening and why?
Hi CG,
Without knowing what is in "samp", I can only guess. My first guess
would be that you have some cultivars that have no available data. Also,
note that I didn't bother to make the example general with:
for(cultivar in 1:length(cultivars))
The only other thing I can think of at the moment is that "samp" might
be a matrix, in which case boxplot will try to plot each row separately,
throwing warnings each time it hits a row of NAs.
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.