clsAdd | R Documentation |
Query or alter sample meta information in AnalysisData
or Analysis
class objects.
Replace a given sample info column from an Analysis or AnalysisData object.
clsAdd(d, cls, value, ...)
## S4 method for signature 'AnalysisData'
clsAdd(d, cls, value)
## S4 method for signature 'Analysis'
clsAdd(d, cls, value, type = c("pre-treated", "raw"))
clsArrange(d, cls = "class", descending = FALSE, ...)
## S4 method for signature 'AnalysisData'
clsArrange(d, cls = "class", descending = FALSE)
## S4 method for signature 'Analysis'
clsArrange(
d,
cls = "class",
descending = FALSE,
type = c("pre-treated", "raw")
)
clsAvailable(d, ...)
## S4 method for signature 'AnalysisData'
clsAvailable(d)
## S4 method for signature 'Analysis'
clsAvailable(d, type = c("pre-treated", "raw"))
clsExtract(d, cls = "class", ...)
## S4 method for signature 'AnalysisData'
clsExtract(d, cls = "class")
## S4 method for signature 'Analysis'
clsExtract(d, cls = "class", type = c("pre-treated", "raw"))
clsRemove(d, cls, ...)
## S4 method for signature 'AnalysisData'
clsRemove(d, cls)
## S4 method for signature 'Analysis'
clsRemove(d, cls, type = c("pre-treated", "raw"))
clsRename(d, cls, newName, ...)
## S4 method for signature 'AnalysisData'
clsRename(d, cls, newName)
## S4 method for signature 'Analysis'
clsRename(d, cls, newName, type = c("pre-treated", "raw"))
clsReplace(d, value, cls = "class", ...)
## S4 method for signature 'AnalysisData'
clsReplace(d, value, cls = "class")
## S4 method for signature 'Analysis'
clsReplace(d, value, cls = "class", type = c("pre-treated", "raw"))
d |
S4 object of class Analysis or AnalysisData |
cls |
sample info column to extract |
value |
vactor of new sample information for replacement |
... |
arguments to pass to specific method |
type |
|
descending |
TRUE/FALSE, arrange samples in descending order |
newName |
new column name |
clsAdd
: Add a sample information column.
clsArrange
: Arrange sample row order by a specified sample information column.
clsAvailable
: Retrieve the names of the available sample information columns.
clsExtract
: Extract the values of a specified sample information column.
clsRemove
: Remove a sample information column.
clsRename
: Rename a sample information column.
clsReplace
: Replace a sample information column.
library(metaboData)
d <- analysisData(abr1$neg,abr1$fact)
## Add a sample information column named 'new'
d <- clsAdd(d,'new',1:nSamples(d))
print(d)
## Arrange the row orders by the 'day' column
d <- clsArrange(d,'day')
clsExtract(d,'day')
## Retreive the available sample information column names
clsAvailable(d)
## Extract the values of the 'day' column
clsExtract(d,'day')
## Remove the 'class' column
d <- clsRemove(d,'class')
clsAvailable(d)
## Rename the 'day' column to 'treatment'
d <- clsRename(d,'day','treatment')
clsAvailable(d)
## Replace the values of the 'treatment' column
d <- clsReplace(d,rep(1,nSamples(d)),'treatment')
clsExtract(d,'treatment')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.