Learn R Programming

ffbase2 (version 0.2)

tbl_ffdf: Create a ffdf tbl object

Description

This wraps a 'normal' ffdf object so it can be used with dplyr. It also allows for storing ffdf object in directories/src or retrieving a specific ffdf from a source.

Usage

tbl_ffdf(data, src = getOption("fftempdir"), name = deparse(substitute(data)), ...)
"as.tbl"(x, ...)
"tbl_vars"(x)
"tbl_vars"(x)
"as.data.frame"(x, row.names = NULL, optional = FALSE, ...)
"print"(x, ..., n = NULL)
"head"(x, n = 6L, ...)
"tail"(x, n = 6L, ...)

Arguments

data
a ffdf data.frame, will be converted to ffdf using as.ffdf
src
(optional), if a directory name is specified then the ffdf will be saved there
name
table to be loaded
...
not used
x
any R object.
row.names
NULL or a character vector giving the row names for the data frame. Missing values are not allowed.
optional
logical. If TRUE, setting row names and converting column names (to syntactic names: see make.names) is optional.
n
restrict number of rows to n

Details

When data and src are specified a copy_to will be executed. When src and from are specified an ffdf will be loaded from disk. When data is specified without src a temporary ffdf will be created in fftempdir.

Examples

Run this code
ds <- tbl_ffdf(mtcars)
ds

Run the code above in your browser using DataLab