DataFrameList-class {IRanges} | R Documentation |
Represents a list of DataFrame
objects.
The SplitDataFrameList
class contains the additional restriction
that all the columns be of the same name and type. Internally it is stored
as a list of DataFrame
objects and extends
Sequence
.
In the following code snippets, x
is a DataFrameList
.
dim(x)
: Get the two element integer vector indicating
the number of rows and columns over the entire dataset.dimnames(x)
: Get the list of two character vectors,
the first holding the rownames (possibly NULL
) and the second
the column names.
columnMetadata(x)
: Get the DataFrame
of
metadata along the columns, i.e., where each column in x
is
represented by a row in the metadata. The metadata is common
across all elements of x
. Note that
calling elementMetadata(x)
returns the metadata on
the DataFrame
elements of x
.
columnMetadata(x) <- value
: Set the DataFrame
of metadata for the columns.
In the following code snippets, x
is a SplitDataFrameList
. In
general x
follows the conventions of
SimpleList
/CompressedList
with the following addition:
x[i,j,drop]
: If matrix subsetting is used, i
selects
either the list elements or the rows within the list elements as
determined by the [
method for
SimpleList
/CompressedList
, codej selects the columns,
and drop
is used when one column is selected and output can
be coerced into an AtomicList
or RangesList
subclass.
x[i,j] <- value
: If matrix subsetting is used, i
selects either the list elements or the rows within the list elements
as determined by the [<-
method for
SimpleList
/CompressedList
, j
selects the columns
and value
is the replacement value for the selected region.
DataFrameList(...)
: Concatenates the DataFrame
objects in ...
into a new DataFrameList
.SplitDataFrameList(..., compress = TRUE, cbindArgs =
FALSE)
: If cbindArgs
is FALSE
, the ...
arguments are coerced to DataFrame
objects and concatenated
to form the result. The arguments must have the same number and
names of columns. If cbindArgs
is TRUE
, the
arguments are combined as columns. The arguments must then be the
same length, with each element of an argument mapping to an
element in the result. If compress = TRUE
, returns a
CompressedSplitDataFrameList
; else returns a
SimpleSplitDataFrameList
.
In the following code snippets, objects in ...
are of class
DataFrameList
.
rbind(...)
: Creates a new DataFrameList
containing
the element-by-element row concatenation of the objects in ...
.
cbind(...)
: Creates a new DataFrameList
containing
the element-by-element column concatenation of the objects in ...
.
In the following code snippets, x
is a DataFrameList
.
as(from, "DataFrame")
: Coerces a
DataFrameList
to an DataFrame
by combining the
rows of the elements. This essentially unsplits the
DataFrame
. Every element of x
must have the same columns.
as(from, "SplitDataFrameList")
: By default, simply
calls the SplitDataFrameList
constructor
on from
. If from
is a Sequence
, each element
of from
is passed as an argument
to SplitDataFrameList
, like calling as.list
on a vector.as.data.frame(x, row.names=NULL, optional=FALSE, ...)
:
Unsplits the DataFrame
and coerces it to a
data.frame
, with the rownames specified in
row.names
. The optional
argument is ignored.
stack(x, indName = "space")
: Unlists x
and
adds a column named indName
to the result, indicating the
element of x
from which each row was obtained.
Michael Lawrence
DataFrame
, RangedData
,
which uses a DataFrameList
to split the data by the spaces.