Functions for coercing to ffdf and data.frame
as.ffdf(x, ...)
# S3 method for ff_vector
as.ffdf(x, ...)
# S3 method for ff_matrix
as.ffdf(x, ...)
# S3 method for data.frame
as.ffdf(x, vmode=NULL, col_args = list(), ...)
# S3 method for ffdf
as.data.frame(x, ...)
the object to be coerced
optional specification of the vmodes
of columns of the data.frame
. Either a character vector of vmodes (named with column names of the data.frame or recycled if not named)
or a list named with vmodes where each element identifies those columns of the data.frame that should get the vmode encoded in the name of the element
further arguments; passed to ff
further arguments; passed to ffdf
for .ff_vector, .ff_matrix and .data.frame methods, ignored for .ffdf identity method
'as.ffdf' returns an object of class ffdf
, 'as.data.frame' returns an object of class data.frame
# NOT RUN { d <- data.frame(x=1:26, y=letters, z=Sys.time()+1:26, stringsAsFactors = TRUE) ffd <- as.ffdf(d) stopifnot(identical(d, as.data.frame(ffd))) rm(ffd); gc() # }
Run the code above in your browser using DataCamp Workspace