remove.samples,RnBSet-method {RnBeads} | R Documentation

## remove.samples-methods

### Description

Removes the specified samples from the dataset.

### Usage

    ## S4 method for signature 'RnBSet'
    remove.samples(object, samplelist)

    ## S4 method for signature 'RnBeadSet'
    remove.samples(object, samplelist)

    ## S4 method for signature 'RnBeadRawSet'
    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

    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)

[Package RnBeads version 1.12.1 Index]