get.adjustment.variables {RnBeads} | R Documentation

## get.adjustment.variables

### Description

Given indices for two groups of samples for comparison, this function retrieves `data.frame` containing the variables to be adjusted for

### Usage

    get.adjustment.variables(rnbSet, inds.g1, inds.g2 = -inds.g1,
      colnames.adj = c(), colname.target = "", adjust.sva = FALSE,
      adjust.celltype = FALSE)

### Arguments

`rnbSet` | RnBSet object
`inds.g1` | sample indices in `rnbSet` of group 1 members
`inds.g2` | sample indices in `rnbSet` of group 2 members
`colnames.adj` | column names in `pheno(rnbSet)` to retrieve
`colname.target` | column names in `pheno(rnbSet)` of the target variable. Only important if `adjust.sva==TRUE`
`adjust.sva` | flag indicating whether the resulting table should also contain surrogate variables (SVs) for the given target variable.
`adjust.celltype` | flag indicating whether the resulting table should also contain estimated celltype contributions. See `rnb.execute.ct.estimation` for details.

### Value

a `data.frame` containing one column for each selected variable from the phenotypic data each row corresponds to a sample in the union of samples of the wto groups with the first `length(inds.g1)` rows corresponding to group 1 and the remaining rows corresponding to group 2

### Author(s)

Fabian Mueller

### Examples

    library(RnBeads.hg19)
    data(small.example.object)
    logger.start(fname=NA)
    sample.groups <- rnb.sample.groups(rnb.set.example)[[1]]
    get.adjustment.variables(rnb.set.example,sample.groups[[1]],sample.groups[[2]],"Cell_Line")

[Package RnBeads version 2.0.1 Index]