Learn R Programming

crunch (version 1.14.4)

dataset-to-R: as.data.frame method for CrunchDataset

Description

This method is defined principally so that you can use a CrunchDataset as a data argument to other R functions (such as lm). Unless you give it the force==TRUE argument, this function does not in fact return a data.frame: it returns an object with an interface like a data.frame, such that you get R vectors when you access its columns (unlike a CrunchDataset, which returns CrunchVariable objects). This allows modeling functions that require select columns of a dataset to retrieve only those variables from the remote server, rather than pulling the entire dataset into local memory.

Usage

"as.data.frame"(x, row.names = NULL, optional = FALSE, force = FALSE, ...)
"as.data.frame"(x, row.names = NULL, optional = FALSE, ...)

Arguments

x
a CrunchDataset
row.names
part of as.data.frame signature. Ignored.
optional
part of as.data.frame signature. Ignored.
force
logical: actually coerce the dataset to data.frame, or leave the columns as unevaluated promises. Default is FALSE.
...
additional arguments passed to as.data.frame.default

Value

an object of class CrunchDataFrame unless force, in which case the return is a data.frame.