bdVector
,
bdFrame
,
or other big data object to the
corresponding ordinary object, or the reverse.
This is a generic function; methods currently exist for
data.frame
,
bdFrame
,
bdVector
,
bdTimeSpan
;
the default method coerces ordinary matrices and vectors to
bdFrame
and
bdVector
, respectively.
This function requires the bigdata library section to be loaded.
bd.coerce(x, bigdata=F, ...)
bdVector
,
bdFrame
, or other big data object, or the
corresponding ordinary objects.
FALSE
(the default) then objects are coerced
to their small data form, e.g. from
bdFrame
to a data frame.
If
TRUE
, then objects are coerced
to their big data form, e.g. from data frame to
bdFrame
.
x
is returned unchanged, if it is already of the desired type.
Otherwise it it coerced to the type determined by the
bigdata
argument.
This function is typically used to coerce a relatively small
bdFrame
or
bdVector
objects into the corresponding
ordinary object. An error occurs if the object is too large for the
available memory.
fuel.bd <- bdFrame(fuel.frame) bd.coerce(fuel.bd) # returns a data frame bd.coerce(fuel.bd[[1]]) # returns a vector