lattice default aspect fails for some data sets (PR#1744)
deepayansarkar@yahoo.com
deepayansarkar@yahoo.com
Sat, 6 Jul 2002 10:27:47 +0200 (MET DST)
Sorry I forgot to fix this earlier. I've replaced round with ceiling in the
development version of lattice, and will try to look out for any unexpected
problems.
--- dieter.menne@menne-biomed.de wrote:
> Full_Name: Dieter Menne
> Version: 1.5.1
> OS: Win2000
> Submission from: (NULL) (212.185.252.129)
>
>
> Lattice Version: 0.5-3
>
> There is a problem in print.trellis that can lead to an
> error reported as follows:
>
> Error in rep(x$x.between, length = cols.per.page - 1) :
> invalid number of copies in "rep"
> In addition: Warning messages:
> 1: argument lengths differ in: split(x, f)
> 2: NAs introduced by coercion
>
> The error only turns up with certain data sets and
> device/aspect ratios and can be tracked down to the following:
>
> if(x$layout[1]==0) { # using device dimensions to
> ddim <- par("din") # calculate default layout
> device.aspect <- ddim[2]/ddim[1]
> panel.aspect <- if(layout.respect) panel.height else 1
>
> plots.per.page <- x$layout[2]
> ##### m can be zero, depending on data
> m <- round(sqrt(x$layout[2] * device.aspect/panel.aspect))
> n <- ceiling(x$layout[2]/m)
> x$layout[1] <- n
>
>
> Quick Fix (works for me, but not tested with different data sets):
>
> >> replace "round" by "ceiling"
>
> Workaround (always works): Use explicit "aspect".
__________________________________________________
Sign up for SBC Yahoo! Dial - First Month Free
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._