[R] Strange problems with lattice plots
Wladimir Eremeev
wl at eimb.ru
Sun Jul 17 05:03:52 CEST 2005
Dear r-help,
I need to draw some lattice plots and have stuck in strange problems.
I have a data frame of 405 rows:
> str(dframe)
`data.frame': 405 obs. of 4 variables:
$ year : num 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 ...
$ month: num 1 2 3 4 5 6 7 8 9 10 ...
$ V_A2 : num NA NA NA NA NA ...
$ V_A3 : num NA NA NA NA NA ...
Variable month changes from 1 to 27 as the data frame includes monthly
measurements and some aggregations of them.
Variable year varies from 1990 to 2004.
Variables V_A2 and V_A3 contain floating point values and several NAs (as
sometimes measurements were unavailable).
I draw plots:
xyplot((V_A3/25)~year|
factor(month,labels=c(month.name,"Annual mean",
"Annual integral","Integral (Jan-Mar)","Integral (Apr-Jun)","Integral (Jul-Sep)","Integral (Oct-Dec)",
"Integral (Jan-Feb)","Integral (Jan-Mar)","Integral (Jan-Apr)","Integral (Jan-May)","Integral (Jan-Jun)",
"Integral (Jan-Jul)","Integral (Jan-Aug)","Integral (Jan-Sep)","Integral (Jan-Oct)")),
data=dfame,as.table=TRUE,type=c("o","g","r"),layout=c(3,9),
ylab="Flow, Sv",xlab=NULL)
However, instead of plots I am getting the following error
Error in do.call("pmax", lapply(cond, is.na)) :
symbol print-name too long
Shortening factor labels doesn't help.
Removing them at all solves the problem, but this doesn't meet my needs, as I have to
explain the meaning of each plot.
Could you, please, explain me, what does it mean, and what should I do
to avoid this and get my plots?
The ways to solve my task I see now are either to make subsets (I
wonder if it will work with the only addition of subset parameter to
call of xyplot) or to add captions to the plots to the picture in the
graphic editor.
I would like to avoid these.
Thank you very much in helping me to solve the problem!
---
Best regards,
Wladimir mailto:wl at eimb.ru
==========================================================================
Research Scientist, PhD Leninsky Prospect 33,
Space Monitoring & Ecoinformation Systems Sector, Moscow, Russia, 119071,
Institute of Ecology, Phone: (095) 135-9972;
Russian Academy of Sciences Fax: (095) 135-9972
More information about the R-help
mailing list