Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

as.ffdf

Coercing to ffdf and data.frame


Description

Functions for coercing to ffdf and data.frame

Usage

as.ffdf(x, ...)
## S3 method for class 'ff_vector'
as.ffdf(x, ...)
## S3 method for class 'ff_matrix'
as.ffdf(x, ...)
## S3 method for class 'data.frame'
as.ffdf(x, vmode=NULL, col_args = list(), ...)
## S3 method for class 'ffdf'
as.data.frame(x, ...)

Arguments

x

the object to be coerced

vmode

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

col_args

further arguments; passed to ff

...

further arguments; passed to ffdf for .ff_vector, .ff_matrix and .data.frame methods, ignored for .ffdf identity method

Value

'as.ffdf' returns an object of class ffdf, 'as.data.frame' returns an object of class data.frame

Author(s)

Jens Oehlschlägel

See Also

Examples

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()

ff

Memory-Efficient Storage of Large Data on Disk and Fast Access Functions

v4.0.4
GPL-2 | GPL-3 | file LICENSE
Authors
Daniel Adler [aut], Christian Gläser [aut], Oleg Nenadic [aut], Jens Oehlschlägel [aut, cre], Martijn Schuemie [aut], Walter Zucchini [aut]
Initial release
2020-10-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.