Analyses class and methods for handling statistical analysis data
Source:R/class_Analyses_StatisticAnalyses.R
StatisticAnalyses.Rd
The StatisticAnalyses
class is used for tabular data statistical analysis.
Usage
StatisticAnalyses(
analyses = NULL,
classes = character(),
concentrations = numeric(),
...
)
# S3 method for class 'StatisticAnalyses'
validate_object(x)
# S3 method for class 'StatisticAnalyses'
get_analysis_names(x)
# S3 method for class 'StatisticAnalyses'
get_analysis_classes(x)
# S3 method for class 'StatisticAnalyses'
set_analysis_classes(x, value)
# S3 method for class 'StatisticAnalyses'
get_concentrations(x)
# S3 method for class 'MassSpecAnalyses'
set_concentrations(x, value)
# S3 method for class 'StatisticAnalyses'
info(x)
# S3 method for class 'StatisticAnalyses'
add(x, value, ...)
# S3 method for class 'StatisticAnalyses'
remove(x, value)
# S3 method for class 'StatisticAnalyses'
x[i] <- value
# S3 method for class 'StatisticAnalyses'
x[[i]] <- value
# S3 method for class 'StatisticAnalyses'
plot_data(
x,
analyses = NULL,
features = NULL,
transpose = FALSE,
interactive = TRUE,
xLab = NULL,
yLab = NULL,
title = NULL,
colorGroups = NULL,
xTickLabelsShow = TRUE
)
Arguments
- analyses
Character or numeric vector with names or indexes of analyses in the
Analyses
object.- classes
A
character
vector with the classes of the analyses.- concentrations
A
numeric
vector with the concentrations of the analyses.- ...
Additional arguments passed to
read.csv
whet a file path is given.- x
A
StatisticAnalyses
object.- value
An object that highly depends on the method. Check the specific method documentation for details.
- i
A character or numeric vector to perform subsetting. Check the specific method for details.
- features
A numeric vector with the feature/variable indices (i.e., columns of data frame).
- transpose
Logical, if TRUE the data is transposed (e.g., column names are used as legend when plotting).
- interactive
Logical (length 1). When
TRUE
, the data is plotted interactively using plotly.- xLab
A string with the title for the x axis.
- yLab
A string with the title for the y axis.
- title
A string with the title.
- colorGroups
A factor character vector with the color groups for the data.
- xTickLabelsShow
Logical, if TRUE the x-axis tick labels are shown.
Value
A StatisticAnalyses
object, which is a list with the following components:
analyses
: Adata.frame
ormatrix
with the analyses data, where the row names are the analyses names and the column names are the variable names.classes
: Acharacter
vector with the classes of the analyses.concentrations
: Anumeric
vector with the concentrations of the analyses.results
: A list with the results of the analyses.type
: Acharacter
vector with the type of the analyses, which is"Statistic"
.formats
: Acharacter
vector with the file formats of the analyses, which is"csv"
.
Methods (by generic)
validate_object(StatisticAnalyses)
: Validate the StatisticAnalyses object, returnsNULL
if valid.get_analysis_names(StatisticAnalyses)
: Get the names of the analyses, which is the row names of theanalyses
data frame.get_analysis_classes(StatisticAnalyses)
: Get the classes assigned to each analysis.set_analysis_classes(StatisticAnalyses)
: Set the classes of the analyses, where the argumentvalue
must be a character vector with the same length as the number of analyses.get_concentrations(StatisticAnalyses)
: Get the concentration values of each analysis.info(StatisticAnalyses)
: Get a data frame with the analyses, features, classes and concentrations.add(StatisticAnalyses)
: Add new analyses to theStatisticAnalyses
object, where the argumentvalue
must be a csv file or directly a data frame with the same column names as the existing analyses.remove(StatisticAnalyses)
: Remove analyses from theStatisticAnalyses
object, where the argumentvalue
can be a character vector with the names of the analyses or a numeric vector with the indices of the analyses to remove.`[`(StatisticAnalyses) <- value
: Add new analyses to theStatisticAnalyses
object, where the argumentvalue
must be a csv file or directly a data frame with the same column names as the existing analyses.`[[`(StatisticAnalyses) <- value
: Add new analyses to theStatisticAnalyses
object, where the argumentvalue
must be a csv file or directly a data frame with the same column names as the existing analyses.plot_data(StatisticAnalyses)
: Plot the data of theStatisticAnalyses
object.