[R] do.call in 2.3.0 vers 2.3.x
Gabor Grothendieck
ggrothendieck at gmail.com
Thu May 4 13:13:41 CEST 2006
See:
https://www.stat.math.ethz.ch/pipermail/r-devel/2006-May/037542.html
On 5/4/06, Dieter Menne <dieter.menne at menne-biomed.de> wrote:
> Dear R-Core,
>
> after switching to 2.3.0, all my trusted do.call constructs that worked in
> 2.2 and earlier fail. I noted that changes were introduced to do.call, but I
> could not find out how these relate to my problem.
>
> The following example works in 2.2 and earlier, but fails because rownames
> are partially NA. I can correct this by manually adding row names, but it's
> a bit of work to check this in all my code.
>
> Dieter
>
> ------
>
> wby = by(warpbreaks[, 1:2], warpbreaks$tension,
> function(x) {
> data.frame(breaks=mean(x$breaks),var=var(x$breaks))
> }
> )
>
> cd = do.call("rbind",wby)
> row.names(cd)
> cd
>
> ---- Output in 2.3.0
> > row.names(cd)
> [1] NA "NA1" "NA2"
> > cd
> Error in data.frame(breaks = c("36.38889", "26.38889", "21.66667"), var =
> c("270.48693", :
> row names contain missing values
> >
>
> ----
> platform i386-pc-mingw32
> arch i386
> os mingw32
> system i386, mingw32
> status
> major 2
> minor 3.0
> year 2006
> month 04
> day 24
> svn rev 37909
> language R
> version.string Version 2.3.0 (2006-04-24)
>
> ______________________________________________
> 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
>
More information about the R-help
mailing list