[R] Lattice bwplot error
Yang, Richard
dyang at NRCan.gc.ca
Fri Mar 11 18:47:20 CET 2005
Dear all;
Searching the R site for answers to my problem, but found none.
Here is the run and error:
> bwplot(dev ~ Dbhcl | Period, data = DbhValid2, font = 2,
+ main=list(" "), axis.font =2,
+ ylab = list(label = "Residual (cm)", font = 2),
+ xlab = list(label = "Dbh class (cm)", font = 2),
+ par.strip.text=list(cex=0.8, font=2),
+ panel=function(x, y) {
+ panel.grid()
+ panel.abline(h = 0)
+ panel.bwplot(x, y, horizontal = TRUE)
+ }
+ )
Error in "[<-"(`*tmp*`, pos.heights[[nm]], value = numeric(0)) :
nothing to replace with
> str(DbhValid2$dev)
num [1:11469] 0.318 0.764 1.230 0.403 0.526 ...
> str(DbhValid2$Dbhcl)
Factor w/ 26 levels "2","3","4","5",..: 9 9 9 10 10 10 10 11 11 11 ...
Stepped through debugging bwplot(), I couldn't locate where the error
occurred (there are more than 11,000 data points). However, I had no problem
using boxplot() to generate four graphs separately:
> boxplot(dev ~ Dbhcl, data=DbhValid2[DbhValid2$period == 5,])
Any ideas and suggestions?
TIA,
Richard Yang
Northern Forestry Centre / Centre de foresterie du Nord
Canadian Forest Service / Service canadien des forêts
Natural Resources Canada / Ressources naturelles Canada
5320-122 Street / 5320, rue 122
Edmonton Alberta Canada
T6H 3S5
More information about the R-help
mailing list