Description Merging Splitting Looping Subsetting based on NA content Transforming Statistical modeling with DataFrame Author(s) See Also Examples
Common operations on DataFrame objects.
In the code snippet below, x
is a DataFrame object.
merge(x, y, ...)
: Merges two DataFrame objects
x
and y
, with arguments in ...
being
the same as those allowed by the base merge
. It is
allowed for either x
or y
to be a data.frame
.
In the code snippet below, x
is a DataFrame object.
split(x, f, drop = FALSE)
:
Splits x
into a SplitDataFrameList
object, according to f
, dropping elements corresponding
to unrepresented levels if drop
is TRUE
.
In the code snippet below, x
is a DataFrame object.
by(data, INDICES, FUN, ..., simplify = TRUE)
:
Apply FUN
to each group of data
, a DataFrame,
formed by the factor (or list of factors) INDICES
. Exactly
the same contract as as.data.frame
.
In the code snippets below, x
is a DataFrame object.
na.omit(object)
:
Returns a subset with incomplete cases removed.
na.exclude(object)
:
Returns a subset with incomplete cases removed (but to be
included with NAs in statistical results).
is.na(x)
:
Returns a logical matrix indicating which cells are missing.
complete.cases(x)
:
Returns a logical vector identifying which cases have no missing values.
In the code snippet below, x
is a DataFrame object.
transform(`_data`, ...)
: adds or replaces columns based on
expressions in ...
. See transform
.
A number of wrappers are implemented for performing statistical procedures, such as model fitting, with DataFrame objects.
xtabs(formula = ~., data, subset, na.action,
exclude = c(NA, NaN), drop.unused.levels = FALSE)
:
Like the original xtabs
, except data
is a
DataFrame.
Michael Lawrence
DataFrame objects.
merge
in the base package.
by
in the base package.
splitAsList
in this package (S4Vectors).
SplitDataFrameList objects in the IRanges package.
na.omit
in the stats package.
transform
in the base package.
xtabs
in the stats package.
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.