Description Use in Biobase eSet objects Row and Column Summaries Slots Extends Methods Author(s) See Also Examples

The `RleDataFrame`

class serves to hold a collection of Run Length
Encoded vectors (Rle objects) of the same length. For example, it could
be used to hold information along the genome for a number of samples,
such as sequencing coverage, DNA copy number, or GC content. This class
inherits from both DataFrame and SimpleRleList (one of the AtomicVector
types). This means that all of the usual subsetting and applying
functions will work. Also, the AtomicList functions, like `mean`

and
`sum`

, that automatically apply over the list elements will
work. The scalar mathematical `AtomicList`

methods can make this
class behave much like a matrix (see Examples).

New objects can be created with the `RleDataFrame`

constructor:
`RleDataFrame(..., row.names=NULL)`

, where `...`

can be a list
of Rle objects, or one or more individual Rle objects.

The `genoset`

class defines an `annotatedDataFrameFrom`

method for `DataFrame`

, which makes it possible to include
`DataFrames`

as `assayData`

elements. The column names for
`DataFrame`

cannot be `NULL`

, which makes it impossible to
use them as assays in `SummarizedExperiment`

at this time.

These objects will sometimes be in place of a matrix, as in the eSet example above. It is convenient to have some of the summarization methods for matrices. Each of these methods takes an RleDataFrame and returns a single Rle. The time required is similar to that required for a matrix. For an RleDataFrame x,

`rowSums`

:

Sum across 'rows'.

`rowMeans`

:

Means across 'rows'.

`colSums`

:

Sum each Rle. This is just the `sum`

method for SimpleRleList.

`colSums`

:

Mean of each Rle. This is just the
`mean`

method for SimpleRleList.

`rownames`

:Object of class

`"character_OR_NULL"`

Names to describe each row of the DataFrame. These may end up taking more space than your collection of Rle objects, so consider leaving this NULL.`nrows`

:Object of class

`"integer"`

Number of rows.`elementType`

:Object of class

`"character"`

Notes that elements of the internal list are Rle objects.`elementMetadata`

:Object of class

`"DataTable_OR_NULL"`

Metadata on the elements, see DataFrame.`metadata`

:Object of class

`"list"`

Metadata on the whole object, see DataFrame.`listData`

:Object of class

`"list"`

Base list containing the Rle objects.

Class `"SimpleRleList"`

, directly.
Class `"DataFrame"`

, directly.

- as.matrix
`signature(x = "RleDataFrame")`

: Convert to matrix.- coerce
`signature(x = "RleDataFrame")`

: Convert to other classes.- colMeans
`signature(x = "RleDataFrame")`

: Mean of each column.- colSums
`signature(x = "RleDataFrame")`

: Sum of each column.- rowMeans
`signature(x = "RleDataFrame")`

: Mean of each 'row'.- rowSums
`signature(x = "RleDataFrame")`

: Sum of each 'row'.- show
`signature(object = "RleDataFrame")`

: Short and pretty description of an object of this type.

Peter M. Haverty, design suggestion from Michael Lawrence.

`DataFrame`

`AtomicList`

`Rle`

`RleList`

`rowMeans`

`colMeans`

`rowSums`

`colSums`

`view-summarization-methods`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ```
showClass("RleDataFrame")
## Constructors
df = new("RleDataFrame", listData=list(A=Rle(c(NA, 2:3, NA, 5), rep(2,
5)), B=Rle(c(6:7, NA, 8:10),c(3,2,1,2,1,1))), nrows=10L)
df2 = RleDataFrame(list(A=Rle(c(NA, 2:3, NA, 5), rep(2, 5)),
B=Rle(c(6:7, NA, 8:10),c(3,2,1,2,1,1))))
df3 = RleDataFrame(A=Rle(c(NA, 2:3, NA, 5), rep(2, 5)), B=Rle(c(6:7,
NA, 8:10),c(3,2,1,2,1,1)))
## AtomicList Methods
runValue(df)
runLength(df)
ranges(df)
mean(df)
sum(df)
df + 5
log2(df) - 1
## Row and Column Summaries
rowSums(df)
colSums(df)
rowMeans(df)
colMeans(df)
## Coercion
as(df, "matrix")
as(df, "list")
as(df, "RleList")
as(df, "DataFrame")
as(df, "data.frame")
``` |

genoset documentation built on May 2, 2018, 3:36 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.