This method is defined principally so that you can use a CrunchDataset as
a data argument to other R functions (such as
[stats::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.
# S3 method for CrunchDataset
as.data.frame(x, row.names = NULL, optional = FALSE,
force = FALSE, row.order = NULL, ...)# S3 method for CrunchDataFrame
as.data.frame(x, row.names = NULL,
optional = FALSE, ...)
a CrunchDataset
part of as.data.frame signature. Ignored.
part of as.data.frame signature. Ignored.
logical: actually coerce the dataset to data.frame, or
leave the columns as unevaluated promises. Default is FALSE.
vector of indeces. Which, and their order, of the rows of the dataset should be presented as (default: NULL). If NULL, then the Crunch Dataset order will be used.
additional arguments passed to as.data.frame.default
an object of class CrunchDataFrame unless force, in
which case the return is a data.frame.