## this example shows a problem in key.
tmp <- data.frame(y=rnorm(10), g=rep(ordered(c("A","B")),
5))
bwplot(y ~ g, data=tmp,
key=list(
text=list(c("A","B"),
col=c("blue","red")),
points=list(pch=c(17, 16), col=c("blue","red")),
space="top", columns=2, border=TRUE,
title="Treatment", cex.title=.9
)
)
## The example works without warning messages in 2.15.1.
## I first detected the problem in
##### R Under development (unstable) (2012-07-24 r59961) ## windows
##### R Under development (unstable) (2012-08-02 r60091) ## macintosh
## The problem still exists in
## R Under development (unstable) (2012-08-13 r60245) -- "Unsuffered
Consequences"
## downloaded from lib.stat.cmu.edu Wed Aug 15 2012 11PM EST
> tmp <- data.frame(y=rnorm(10),
g=rep(ordered(c("A","B")), 5))
> bwplot(y ~ g, data=tmp,
+ key=list(
+ text=list(c("A","B"),
col=c("blue","red")),
+ points=list(pch=c(17, 16), col=c("blue","red")),
+ space="top", columns=2, border=TRUE,
+ title="Treatment", cex.title=.9
+ )
+ )
Warning messages:
1: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL
2: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL
3: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL
4: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL
5: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be
NULL> version
_
platform i386-w64-mingw32
arch i386
os mingw32
system i386, mingw32
status Under development (unstable)
major 2
minor 16.0
year 2012
month 08
day 13
svn rev 60245
language R
version.string R Under development (unstable) (2012-08-13 r60245)
nickname Unsuffered Consequences>
[[alternative HTML version deleted]]
This is not the address for the maintainer of package 'lattice': what did he say when you asked him (see the posting guide)? (Because I reported it some weeks back, I know he agrees it is a bug in lattice and will be fixed in the next release.) On 16/08/2012 04:05, Richard M. Heiberger wrote:> ## this example shows a problem in key. > tmp <- data.frame(y=rnorm(10), g=rep(ordered(c("A","B")), 5)) > bwplot(y ~ g, data=tmp, > key=list( > text=list(c("A","B"), col=c("blue","red")), > points=list(pch=c(17, 16), col=c("blue","red")), > space="top", columns=2, border=TRUE, > title="Treatment", cex.title=.9 > ) > ) > ## The example works without warning messages in 2.15.1. > ## I first detected the problem in > ##### R Under development (unstable) (2012-07-24 r59961) ## windows > ##### R Under development (unstable) (2012-08-02 r60091) ## macintosh > ## The problem still exists in > ## R Under development (unstable) (2012-08-13 r60245) -- "Unsuffered > Consequences" > ## downloaded from lib.stat.cmu.edu Wed Aug 15 2012 11PM EST > > >> tmp <- data.frame(y=rnorm(10), g=rep(ordered(c("A","B")), 5)) >> bwplot(y ~ g, data=tmp, > + key=list( > + text=list(c("A","B"), col=c("blue","red")), > + points=list(pch=c(17, 16), col=c("blue","red")), > + space="top", columns=2, border=TRUE, > + title="Treatment", cex.title=.9 > + ) > + ) > Warning messages: > 1: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL > 2: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL > 3: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL > 4: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL > 5: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL >> version > _ > platform i386-w64-mingw32 > arch i386 > os mingw32 > system i386, mingw32 > status Under development (unstable) > major 2 > minor 16.0 > year 2012 > month 08 > day 13 > svn rev 60245 > language R > version.string R Under development (unstable) (2012-08-13 r60245) > nickname Unsuffered Consequences >> > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
On Thu, Aug 16, 2012 at 8:35 AM, Richard M. Heiberger <rmh at temple.edu> wrote:> ## this example shows a problem in key. > tmp <- data.frame(y=rnorm(10), g=rep(ordered(c("A","B")), 5)) > bwplot(y ~ g, data=tmp, > key=list( > text=list(c("A","B"), col=c("blue","red")), > points=list(pch=c(17, 16), col=c("blue","red")), > space="top", columns=2, border=TRUE, > title="Treatment", cex.title=.9 > ) > ) > ## The example works without warning messages in 2.15.1.Thanks for the report. This is due to rep(NULL, length.out=...) now giving a warning. As Prof Ripley has mentioned, a similar bug was fixed elsewhere, but this one still persists. I haven't yet found an easy way of fixing all of these, so if you find more instances, please report them to me (or file a bug at https://r-forge.r-project.org/tracker/?func=browse&group_id=638&atid=2567), and I'll take a look as soon as possible. -Deepayan> ## I first detected the problem in > ##### R Under development (unstable) (2012-07-24 r59961) ## windows > ##### R Under development (unstable) (2012-08-02 r60091) ## macintosh > ## The problem still exists in > ## R Under development (unstable) (2012-08-13 r60245) -- "Unsuffered > Consequences" > ## downloaded from lib.stat.cmu.edu Wed Aug 15 2012 11PM EST > > >> tmp <- data.frame(y=rnorm(10), g=rep(ordered(c("A","B")), 5)) >> bwplot(y ~ g, data=tmp, > + key=list( > + text=list(c("A","B"), col=c("blue","red")), > + points=list(pch=c(17, 16), col=c("blue","red")), > + space="top", columns=2, border=TRUE, > + title="Treatment", cex.title=.9 > + ) > + ) > Warning messages: > 1: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL > 2: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL > 3: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL > 4: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL > 5: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL >> version > _ > platform i386-w64-mingw32 > arch i386 > os mingw32 > system i386, mingw32 > status Under development (unstable) > major 2 > minor 16.0 > year 2012 > month 08 > day 13 > svn rev 60245 > language R > version.string R Under development (unstable) (2012-08-13 r60245) > nickname Unsuffered Consequences >> > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel