[Rd] reshape error in 1.4 (PR#1231)

Peter Dalgaard BSA p.dalgaard@biostat.ku.dk
27 Dec 2001 23:10:45 +0100


Kevin.Wright@pioneer.com writes:

> Full_Name: Kevin Wright
> Version: 1.4
> OS: Windows 95
> Submission from: (NULL) (170.54.59.160)
> 
> 
> Note: This was the 1.4 build for Windows that Brian Ripley made available.
> 
> The first example in the help for reshape doesn't work for me.  When I cut and
> paste, this is what happens:
> 
> >      data(Indometh,package="nls")
> >      summary(Indometh)
>  Subject      time            conc       
>  1:11    Min.   :0.250   Min.   :0.0500  
>  4:11    1st Qu.:0.750   1st Qu.:0.1100  
>  2:11    Median :2.000   Median :0.3400  
>  5:11    Mean   :2.886   Mean   :0.5918  
>  6:11    3rd Qu.:5.000   3rd Qu.:0.8325  
>  3:11    Max.   :8.000   Max.   :2.7200  
> >      wide<-reshape(Indometh,v.names="conc",idvar="Subject",
> +                     timevar="time",direction="wide")
> Error in tapply(a, data[, idvar], function(b) length(unique(b)) == 1) : 
>         arguments must have same length

This doesn't appear to be reproducible on non-Windows machines, and
I'd suspect that Brian checks quite carefully for this kind of thing
on Windows as well. You wouldn't happen to have something floating
around in your workspace that could get in the way? Otherwise try
turning on debug(reshape) and when it is defined also
debug(reshapeWide). Then tell us what is in a and data[, idvar] when
the problem appears.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._