getAnalytes {SomaDataIO} | R Documentation |
Get Analytes
Description
Return the feature names (i.e. the column names for
SOMAmer reagent analytes) from a soma_adat
.
S3 methods also exist for these classes:
#> [1] getAnalytes.character getAnalytes.data.frame getAnalytes.default #> [4] getAnalytes.list getAnalytes.matrix getAnalytes.recipe #> [7] getAnalytes.soma_adat #> see '?methods' for accessing help and source code
getMeta()
returns the inverse, a character vector of string
names of non-analyte feature columns/variables, which typically
correspond to the clinical ("meta") data variables.
S3 methods exist for these classes:
#> [1] getMeta.character getMeta.data.frame getMeta.default getMeta.list #> [5] getMeta.matrix getMeta.soma_adat #> see '?methods' for accessing help and source code
Usage
getAnalytes(x, n = FALSE, rm.controls = FALSE)
getMeta(x, n = FALSE)
getFeatures(x, n = FALSE, rm.controls = FALSE)
Arguments
x |
Typically a |
n |
Logical. Return an integer corresponding to the length of the features? |
rm.controls |
Logical. Should all control and non-human analytes
(e.g. |
Value
getAnalytes()
: a character vector of ADAT feature ("analyte") names.
getMeta()
: a character vector of ADAT clinical ("meta") data names.
For both, if n = TRUE
, an integer corresponding to the
length of the character vector.
Functions
-
getFeatures()
:. Please now use
getAnalytes()
.
Author(s)
Stu Field
See Also
Examples
# RFU feature variables
apts <- getAnalytes(example_data)
head(apts)
getAnalytes(example_data, n = TRUE)
# vector string
bb <- getAnalytes(names(example_data))
all.equal(apts, bb)
# create some control sequences
# ~~~~~~~~~ Spuriomer ~~~ HybControl ~~~
apts2 <- c("seq.2053.2", "seq.2171.12", head(apts))
apts2
no_crtl <- getAnalytes(apts2, rm.controls = TRUE)
no_crtl
setdiff(apts2, no_crtl)
# clinical variables
mvec <- getMeta(example_data)
head(mvec, 10)
getMeta(example_data, n = TRUE)
# test 'data.frame' and 'character' S3 methods are identical
identical(getMeta(example_data), getMeta(names(example_data))) # TRUE