Skip to contents

Accessor methods for the AnalysisData and Analysis S4 classes.

Usage

dat(x, ...)

# S4 method for AnalysisData
dat(x)

# S4 method for Analysis
dat(x, type = c("pre-treated", "raw"))

dat(x, ...) <- value

# S4 method for AnalysisData
dat(x) <- value

# S4 method for Analysis
dat(x, type = c("pre-treated", "raw")) <- value

sinfo(x, ...)

# S4 method for AnalysisData
sinfo(x)

# S4 method for Analysis
sinfo(x, type = c("pre-treated", "raw"), value)

sinfo(x, ...) <- value

# S4 method for AnalysisData
sinfo(x) <- value

# S4 method for Analysis
sinfo(x, type = c("pre-treated", "raw")) <- value

raw(x)

# S4 method for Analysis
raw(x)

raw(x) <- value

# S4 method for Analysis
raw(x) <- value

preTreated(x)

# S4 method for Analysis
preTreated(x)

preTreated(x) <- value

# S4 method for Analysis
preTreated(x) <- value

features(x, ...)

# S4 method for AnalysisData
features(x)

# S4 method for Analysis
features(x, type = c("pre-treated", "raw"))

nSamples(x, ...)

# S4 method for AnalysisData
nSamples(x)

# S4 method for Analysis
nSamples(x, type = c("pre-treated", "raw"))

nFeatures(x, ...)

# S4 method for AnalysisData
nFeatures(x)

# S4 method for Analysis
nFeatures(x, type = c("pre-treated", "raw"))

analysisResults(x, element)

# S4 method for Analysis
analysisResults(x, element)

Arguments

x

S4 object of class AnalysisData or Analysis

...

arguments to pass to the appropriate method

type

get or set raw or pre-treated data

value

value to set

element

analysis element results to return

Methods

  • dat: Return a metabolomic data table.

  • dat<-: Set a metabolomic data table.

  • sinfo: Return a sample information data table.

  • sinfo<-: Set a sample information data table.

  • raw: Return the AnalysisData object containing unprocessed metabolomic data from an Analysis object.

  • raw<-: Set an AnalysisData object to the raw slot of an Analysis class object.

  • preTreated: Return the AnalysisData object containing pre-treated metabolomic data from an Analysis object.

  • preTreated<-: Set an AnalysisData object to the pre-treated slot of an Analysis class object.

  • features: Return the features names.

  • nSamples: Return the number of samples.

  • nFeatures: Return the number of features.

  • analysisResults: Return results from an Analysis object of an analysis element.

Examples

library(metaboData)

d <- analysisData(abr1$neg[,200:300],abr1$fact)

## Return the metabolomic data
dat(d)
#> # A tibble: 120 × 101
#>     N200  N201  N202  N203  N204  N205   N206  N207  N208  N209  N210   N211
#>    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl>  <dbl>
#>  1     0  0    0     2.98  0     0     0      0.468 0     1.43  0     0.170 
#>  2     0  0    0     1.30  0     1.15  0      0     0     0.492 0     0     
#>  3     0  0    0     6.08  0.214 2.53  0      1.85  0     1.06  0.184 0.0827
#>  4     0  4.24 0     1.48  0     0     0.147  0     0     0.929 0     0.286 
#>  5     0  0    0     0.530 0     0.233 0.376  1.41  0     0.274 0     0.139 
#>  6     0  0    0     0     0     0.438 0      0     0.219 0.325 0     0     
#>  7     0  0    0     0.547 0     0     0      0     0     0     0     0     
#>  8     0  0    0.195 1.37  0.594 1.11  0.0902 0     0     0     0.162 0     
#>  9     0  0    0     1.24  0     0.196 0.675  0.528 0.128 2.61  0.294 2.66  
#> 10     0  0    0     0.113 0     1.06  0      0     0     1.76  2.96  0     
#> # ℹ 110 more rows
#> # ℹ 89 more variables: N212 <dbl>, N213 <dbl>, N214 <dbl>, N215 <dbl>,
#> #   N216 <dbl>, N217 <dbl>, N218 <dbl>, N219 <dbl>, N220 <dbl>, N221 <dbl>,
#> #   N222 <dbl>, N223 <dbl>, N224 <dbl>, N225 <dbl>, N226 <dbl>, N227 <dbl>,
#> #   N228 <dbl>, N229 <dbl>, N230 <dbl>, N231 <dbl>, N232 <dbl>, N233 <dbl>,
#> #   N234 <dbl>, N235 <dbl>, N236 <dbl>, N237 <dbl>, N238 <dbl>, N239 <dbl>,
#> #   N240 <dbl>, N241 <dbl>, N242 <dbl>, N243 <dbl>, N244 <dbl>, N245 <dbl>, …

## Set the metabolomic data
dat(d) <- abr1$neg[,300:400]

## Return the sample information
sinfo(d)
#> # A tibble: 120 × 9
#>    injorder pathcdf              filecdf name.org remark name    rep day   class
#>       <int> <fct>                <fct>   <fct>    <fct>  <fct> <int> <fct> <int>
#>  1        1 C:/Xcalibur/ANDI-LT… 01.cdf  12_2     ok     12_2      2 2         2
#>  2        2 C:/Xcalibur/ANDI-LT… 02.cdf  13_3     ok     13_4      3 3         3
#>  3        3 C:/Xcalibur/ANDI-LT… 03.cdf  15_4     ok     15_5      5 4         4
#>  4        4 C:/Xcalibur/ANDI-LT… 04.cdf  12_1     ok     12_2      2 1         1
#>  5        5 C:/Xcalibur/ANDI-LT… 05.cdf  12_2     ok     12_2      2 2         2
#>  6        6 C:/Xcalibur/ANDI-LT… 06.cdf  11_1     ok     11_2      1 1         1
#>  7        7 C:/Xcalibur/ANDI-LT… 07.cdf  14_2     ok     14_3      4 2         2
#>  8        8 C:/Xcalibur/ANDI-LT… 08.cdf  11_4     ok     11_5      1 4         4
#>  9        9 C:/Xcalibur/ANDI-LT… 09.cdf  13_H     ok     13_H      3 H         6
#> 10       10 C:/Xcalibur/ANDI-LT… 10.cdf  15_H     ok     15_H      5 H         6
#> # ℹ 110 more rows

## Set the sample information
sinfo(d) <- abr1$fact

## Return the feature names
features(d)
#>   [1] "N300" "N301" "N302" "N303" "N304" "N305" "N306" "N307" "N308" "N309"
#>  [11] "N310" "N311" "N312" "N313" "N314" "N315" "N316" "N317" "N318" "N319"
#>  [21] "N320" "N321" "N322" "N323" "N324" "N325" "N326" "N327" "N328" "N329"
#>  [31] "N330" "N331" "N332" "N333" "N334" "N335" "N336" "N337" "N338" "N339"
#>  [41] "N340" "N341" "N342" "N343" "N344" "N345" "N346" "N347" "N348" "N349"
#>  [51] "N350" "N351" "N352" "N353" "N354" "N355" "N356" "N357" "N358" "N359"
#>  [61] "N360" "N361" "N362" "N363" "N364" "N365" "N366" "N367" "N368" "N369"
#>  [71] "N370" "N371" "N372" "N373" "N374" "N375" "N376" "N377" "N378" "N379"
#>  [81] "N380" "N381" "N382" "N383" "N384" "N385" "N386" "N387" "N388" "N389"
#>  [91] "N390" "N391" "N392" "N393" "N394" "N395" "N396" "N397" "N398" "N399"
#> [101] "N400"

## Return the number of samples
nSamples(d)
#> [1] 120

## Return the number of features
nFeatures(d)
#> [1] 101