This function requires the bigdata library section to be loaded.
bdFactor(x, levels = <<see below>>, labels = <<see below>>,
exclude = NA)
as.bdFactor(x)
is.bdFactor(x)
levels).
Missing values (
NAs) are allowed.
For
is.bdFactor,
x may be any S-PLUS object.
For
as.bdFactor,
x may be
a single-column
bdFrame, a
bdVector, or a vector.
levels will be
NA
in the factor.
The default value of
levels is the sorted list
of distinct values of
x.
(If
x is numeric and contains NAs,
they will be placed at the end of the default value
for
levels.)
If
x is character data
or you want to exclude other values
from the
levels
you can use the
exclude argument.
x
and
exclude will be
NA in the result
and it will not appear in the default
levels attribute.
bdFactor and
as.bdFactor
return an object of class
bdFactor, the big data analog of
factor objects.
is.bdFactor returns
TRUE if
x
inherits from
bdFactor, and
FALSE otherwise.
bd.fuel <- as.bdFrame(fuel.frame)
is.bdFactor(bd.fuel$Type)
occupation <- c("doctor", "lawyer", "mechanic", "engineer")
bdFactor(occupation)