Gerrit Eichner
2005-Mar-22 05:59 UTC
[R] lattice xyplot() postscript (?) problem in R 2.0.0
Dear all, I work with R Version 2.0.0 on Machine hardware: sun4u OS version: 5.9 Processor type: sparc Hardware: SUNW,Sun-Blade-1000 and I have a very simple data frame (called OR) with the following variables:> sapply( OR, class)X ci FTyp "factor" "numeric" "factor" (In OR$ci there are some Inf-values. OR's complete contents are appended below.) If I do> library( lattice) > xyplot( X ~ ci | FTyp, data= OR)the requested trellis plot appears and everything is fine. BUT, if I want to produce this plot in a postscript file a very strange and reproducible error ocurs:> postscript( "OR.ps") > xyplot( X ~ ci | FTyp, data= OR)Error in "[<-"(`*tmp*`, pos.heights[[nm]], value = numeric(0)) : nothing to replace with This procedure -- applied to this very data frame -- did work fine previously, i.e., when I used R 1.9.1. (traceback() didn't help me tracking the problem further down.) I have the impression that it fails since I've started using R 2.0.0. Could this be a version related problem? Any ideas? Thanks for any help! Best regards -- Gerrit PS: Here are the contents of data frame OR:> ORX ci FTyp 1 a 0.0000 A 2 a 0.0000 A 3 a Inf A 4 a 1.1158 B 5 a 0.2578 B 6 a Inf B 7 b 0.6568 A 8 b 0.0159 A 9 b Inf A 10 b 0.1051 B 11 b 0.0164 B 12 b Inf B 13 c Inf A 14 c 0.2217 A 15 c Inf A 16 c 9.2356 B 17 c 1.7123 B 18 c Inf B 19 d 0.4140 A 20 d 0.0099 A 21 d Inf A 22 d 1.7827 B 23 d 0.3606 B 24 d Inf B ----------------------------------------------------------------------- AR Dr. Gerrit Eichner Mathematical Institute gerrit.eichner at math.uni-giessen.de Justus-Liebig-University Giessen Tel: +49-(0)641-99-32104 Arndtstr. 2, 35392 Giessen, Germany Fax: +49-(0)641-99-32029 http://www.math.uni-giessen.de/Stochastik
Gerrit Eichner wrote:> Dear all, > > I work with R Version 2.0.0 on > Machine hardware: sun4u > OS version: 5.9 > Processor type: sparc > Hardware: SUNW,Sun-Blade-1000 > > and I have a very simple data frame (called OR) with the following > variables: > >> sapply( OR, class) > > X ci FTyp > "factor" "numeric" "factor" > > (In OR$ci there are some Inf-values. OR's complete contents are appended > below.) > > If I do > >> library( lattice) >> xyplot( X ~ ci | FTyp, data= OR) > > > the requested trellis plot appears and everything is fine. BUT, if I > want to produce this plot in a postscript file a very strange and > reproducible error ocurs: > >> postscript( "OR.ps") >> xyplot( X ~ ci | FTyp, data= OR) > > Error in "[<-"(`*tmp*`, pos.heights[[nm]], value = numeric(0)) : > nothing to replace with > > This procedure -- applied to this very data frame -- did work fine > previously, i.e., when I used R 1.9.1. (traceback() didn't help me > tracking the problem further down.) > I have the impression that it fails since I've started using R 2.0.0. > Could this be a version related problem? Any ideas?a) You should try R-2.0.1 with a recent version of lattice (or help to try out and test R-devel). It works! b) You want to use trellis.device("postscript", ...) rather than psotscript(). Uwe Ligges> Thanks for any help! > > Best regards -- Gerrit > > PS: Here are the contents of data frame OR: > >> OR > > X ci FTyp > 1 a 0.0000 A > 2 a 0.0000 A > 3 a Inf A > 4 a 1.1158 B > 5 a 0.2578 B > 6 a Inf B > 7 b 0.6568 A > 8 b 0.0159 A > 9 b Inf A > 10 b 0.1051 B > 11 b 0.0164 B > 12 b Inf B > 13 c Inf A > 14 c 0.2217 A > 15 c Inf A > 16 c 9.2356 B > 17 c 1.7123 B > 18 c Inf B > 19 d 0.4140 A > 20 d 0.0099 A > 21 d Inf A > 22 d 1.7827 B > 23 d 0.3606 B > 24 d Inf B > > ----------------------------------------------------------------------- > AR Dr. Gerrit Eichner Mathematical Institute > gerrit.eichner at math.uni-giessen.de Justus-Liebig-University Giessen > Tel: +49-(0)641-99-32104 Arndtstr. 2, 35392 Giessen, Germany > Fax: +49-(0)641-99-32029 http://www.math.uni-giessen.de/Stochastik > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html
Gerrit Eichner
2005-Mar-22 09:06 UTC
[R] Solved: lattice xyplot() postscript (?) problem in R 2.0.0
Thanks to Uwe Ligges! The problem seems to have been my fault. Using his advice b) was the solution for me (under R-2.0.0). (My use of postscript() must have been a relict from my migration from S-PLUS to R.)> a) You should try R-2.0.1 with a recent version of lattice (or help to > try out and test R-devel). It works! > > b) You want to use trellis.device("postscript", ...) rather than > postscript().Regards -- Gerrit ----------------------------------------------------------------------- AR Dr. Gerrit Eichner Mathematical Institute gerrit.eichner at math.uni-giessen.de Justus-Liebig-University Giessen Tel: +49-(0)641-99-32104 Arndtstr. 2, 35392 Giessen, Germany Fax: +49-(0)641-99-32029 http://www.math.uni-giessen.de/Stochastik
Seemingly Similar Threads
- Problem with regression line
- effects & lme4: error since original data frame notfoundWASeffects: error when original data frame is missing
- effects & lme4: error since original data frame not found WASeffects: error when original data frame is missing
- Evaluation "conflict" in combination of replicate() and rexp()as variable inside a function
- Matrix package problem: dsyMatrix %*% vector gives error