Learn R Programming

TransProR (version 1.0.2)

log_transform: Log transformation decision and application on data

Description

This function evaluates the need for a log transformation based on a set of criteria and applies a log2 transformation if necessary.

Usage

log_transform(data)

Value

The original data or the data transformed with log2.

Arguments

data

A numeric matrix or data frame.

Author

Dongyue Yu

Examples

Run this code
file_path <- system.file("extdata",
                         "all_count_exp_test.csv",
                         package = "TransProR")
your_data <- read.csv(file_path,
                      row.names = 1)  # Assuming first column is row names (e.g., gene names)

TransformedData <- log_transform(data = your_data)

Run the code above in your browser using DataLab