[Rd] data.frame could handle long vectors

Jan Gorecki j@goreck| @end|ng |rom w|t@edu@p|
Mon Dec 2 06:55:30 CET 2019


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



More information about the R-devel mailing list