Learn R Programming

RnBeads (version 1.4.0)

remove.samples,RnBSet-method: remove.samples-methods

Description

Removes the specified samples from the dataset.

Usage

"remove.samples"(object, samplelist)
"remove.samples"(object, samplelist)
"remove.samples"(object, samplelist)

Arguments

object
Dataset of interest.
samplelist
List of samples to be removed in the form of a logical, integer or character vector. If this parameter is logical, it is not recycled; its length must be equal to the number of samples in object. If it is integer or character, it must list only samples that exist in the dataset. Specifying sample indices larger than the number of samples, or non-existent sample identifiers results in an error.

Value

The modified dataset.

See Also

remove.sites for removing sites or probes from a methylation dataset

Examples

Run this code

library(RnBeads.hg19)
data(small.example.object)
samples(rnb.set.example)
## remove 3 random samples
s2r<-sample.int(length(samples(rnb.set.example)), 3)
rnb.set.f<-remove.samples(rnb.set.example, s2r)
samples(rnb.set.f)

Run the code above in your browser using DataLab