data.frame could handle long vectors

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

data.frame could handle long vectors

Jan Gorecki
Dear R-devel,

It seems that data.frame class could be improved to handle long
vectors better. It fails while using `data.frame(.)` and the same
using, I believe, lower overhead, `as.data.frame(list(.)). Please find
reproducible example below, tested on 2019-12-01 r77492.

id1 = sample.int(3e9, replace=TRUE)
v1 = runif(3e9)

df = data.frame(id1=id1, v1=v1)
#Error in if (mirn && nrows[i] > 0L) { :
#  missing value where TRUE/FALSE needed
#In addition: Warning message:
#In attributes(.Data) <- c(attributes(.Data), attrib) :
#  NAs introduced by coercion to integer range

df = as.data.frame(list(id1=id1, v1=v1))
#Error in if (mirn && nrows[i] > 0L) { :
#  missing value where TRUE/FALSE needed
#In addition: Warning message:
#In attributes(.Data) <- c(attributes(.Data), attrib) :
#  NAs introduced by coercion to integer range

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel