Description Usage Arguments Value Examples
View source: R/select_samples.r
This functions selects labels and metadata based on a specific column in the metadata. Provided with a column-name in the metadata and a range or a set of allowed values, the function will filter the siamcat-class object accordingly.
1 2 | select.samples(siamcat, filter, allowed.set = NULL,
allowed.range = NULL, verbose = 1)
|
siamcat |
an object of class siamcat-class |
filter |
string, name of the meta variable on which the selection should be done |
allowed.set |
a vector of allowed values |
allowed.range |
a range of allowed values |
verbose |
control output: |
an object of class siamcat-class with labels and metadata filtered in order to contain only allowed values
1 2 3 4 5 6 7 8 9 10 11 | data(siamcat_example)
# Select all samples that fall into an Age-range between 20 and 80 years
siamcat_selected <- select.samples(siamcat_example, 'age',
allowed.range=c(20, 80))
# Select all samples for which information about the gender is given
# Provide additional information with verbose
## Not run: siamcat_selected <- select.samples(siamcat_example, 'gender',
allowed.set=c(1, 2), verbose=2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.