arithmetic-mass_dataset: Log-transform Expression Data in 'mass_dataset' Object

log.mass_datasetR Documentation

Log-transform Expression Data in mass_dataset Object

Description

This 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.

Usage

## 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 signature 'mass_dataset,numeric'
e1 + e2

## S4 method for signature 'mass_dataset,numeric'
e1 - e2

## S4 method for signature 'mass_dataset,numeric'
e1 * e2

## S4 method for signature 'mass_dataset,numeric'
e1 / e2

## S4 method for signature 'mass_dataset,numeric'
e1 > e2

## S4 method for signature 'mass_dataset,numeric'
e1 >= e2

## S4 method for signature 'mass_dataset,numeric'
e1 < e2

## S4 method for signature 'mass_dataset,numeric'
e1 <= e2

## S4 method for signature 'mass_dataset,numeric'
e1 == e2

## S4 method for signature 'mass_dataset'
colSums(x, na.rm = FALSE, dims = 1)

## S4 method for signature 'mass_dataset'
rowSums(x, na.rm = FALSE, dims = 1)

## S4 method for signature 'mass_dataset'
colMeans(x, na.rm = FALSE, dims = 1)

## S4 method for signature 'mass_dataset'
rowMeans(x, na.rm = FALSE, dims = 1)

Arguments

x

x

base

The base of the logarithm. The default is exp(1), which corresponds to the natural logarithm.

center

center

scale

scale

e1

a mass_dataset class object

e2

numeric

na.rm

na.rm

dims

dims

Details

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.

  1. Extracts the expression_data from the mass_dataset object.

  2. Applies the square root transformation to the expression_data.

  3. Updates the expression_data in the mass_dataset object.

  4. Logs the transformation in the process_info attribute, including the package name, function name, parameters, and time.

Value

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

Author(s)

Xiaotao Shen shenxt1990@outlook.com

Xiaotao Shen shenxt1990@outlook.com

Examples

# 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)

## Not run: 
# Assuming 'dataset' is a mass_dataset object
transformed_dataset <- sqrt.mass_dataset(dataset)

## End(Not run)


tidymass/massdataset documentation built on Sept. 14, 2024, 4:41 p.m.