[R] do.call in 2.3.0 vers 2.3.x
Dieter Menne
dieter.menne at menne-biomed.de
Thu May 4 11:23:43 CEST 2006
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)
More information about the R-help
mailing list