Learn R Programming

rliger (version 1.0.1)

reorganizeLiger: Construct a liger object organized by another feature

Description

Using the same data, rearrange functional datasets using another discrete feature in cell.data. This removes most computed data slots, though cell.data and current clustering can be retained.

Usage

reorganizeLiger(
  object,
  by.feature,
  keep.meta = TRUE,
  new.label = "orig.dataset",
  ...
)

Value

liger object with rearranged raw.data slot.

Arguments

object

liger object.

by.feature

Column in cell.data to use in reorganizing raw data.

keep.meta

Whether to carry over all existing data in cell.data slot (default TRUE).

new.label

If cell.data is to be retained, new column name for original organizing feature (previously labeled as dataset) (default "orig.dataset")

...

Additional parameters passed on to createLiger.

Examples

Run this code
ligerex <- createLiger(list(ctrl = ctrl, stim = stim))
# Create a random variable of two categories
ligerex@cell.data$foo <- factor(sample(c(1,2), 600, replace = TRUE))
ligerexFoo <- reorganizeLiger(ligerex, "foo")

Run the code above in your browser using DataLab