mass_dataset ObjectR/arithmetic-mass_dataset.R
arithmetic-mass_dataset.RdThis function applies a log transformation to the expression data
contained within a mass_dataset object.
This function applies an absolute value transformation to the expression data
contained within a mass_dataset object.
This function takes a mass_dataset object and applies the square root transformation
to the expression data stored in the object. It also updates the process_info attribute to log the transformation.
# S3 method for class 'mass_dataset'
log(x, base = exp(1))
# S3 method for class 'mass_dataset'
abs(x)
# S3 method for class 'mass_dataset'
sqrt(x)
# S3 method for class 'mass_dataset'
scale(x, center = TRUE, scale = TRUE)
# S4 method for class 'mass_dataset,numeric'
e1 + e2
# S4 method for class 'mass_dataset,numeric'
e1 - e2
# S4 method for class 'mass_dataset,numeric'
e1 * e2
# S4 method for class 'mass_dataset,numeric'
e1/e2
# S4 method for class 'mass_dataset,numeric'
e1 > e2
# S4 method for class 'mass_dataset,numeric'
e1 >= e2
# S4 method for class 'mass_dataset,numeric'
e1 < e2
# S4 method for class 'mass_dataset,numeric'
e1 <= e2
# S4 method for class 'mass_dataset,numeric'
e1 == e2
# S4 method for class 'mass_dataset'
colSums(x, na.rm = FALSE, dims = 1)
# S4 method for class 'mass_dataset'
rowSums(x, na.rm = FALSE, dims = 1)
# S4 method for class 'mass_dataset'
colMeans(x, na.rm = FALSE, dims = 1)
# S4 method for class 'mass_dataset'
rowMeans(x, na.rm = FALSE, dims = 1)Returns a mass_dataset object with log-transformed expression data.
Returns a mass_dataset object with expression data transformed to absolute values.
A mass_dataset object with updated expression_data and process_info.
mass_dataset object
mass_dataset object
mass_dataset object
mass_dataset object
mass_dataset object
A logical data.frame
A logical data.frame
A logical data.frame
A logical data.frame
A logical data.frame
result
vector object
vector object
vector object
The log.mass_dataset function takes a mass_dataset object as its input,
and applies a log transformation to its expression data. This can be useful
for various downstream analyses that assume or benefit from log-transformed data.
The function also updates the process_info slot of the mass_dataset
object to include information about the log transformation.
The abs.mass_dataset function takes a mass_dataset object as its input
and applies an absolute value transformation to its expression data. This can
be useful in scenarios where negative values in the dataset need to be transformed
to their positive counterparts for subsequent analyses.
Additionally, the function updates the process_info slot of the mass_dataset
object to capture details about the absolute value transformation process.
Extracts the expression_data from the mass_dataset object.
Applies the square root transformation to the expression_data.
Updates the expression_data in the mass_dataset object.
Logs the transformation in the process_info attribute, including the package name, function name, parameters, and time.
# Assuming 'md' is a 'mass_dataset' object
# log_transformed_md <- log(md, base = 2)
# Assuming 'md' is a 'mass_dataset' object
# abs_transformed_md <- abs.mass_dataset(md)
if (FALSE) { # \dontrun{
# Assuming 'dataset' is a mass_dataset object
transformed_dataset <- sqrt.mass_dataset(dataset)
} # }