calc_exp_df: Calculate exponential values from a dataframe

Description Usage Arguments Examples

View source: R/calc_exp_df.R

Description

Reads a data frame and calculates the exponential value (basex) for the defined columns. Non-numeric columns can be excluded by adding the column name in exclusion vector. For partial matching of column names use complete_match = FALSE. See calc_exp_vec.

Usage

1
2
calc_exp_df(x, base = 2, sub = "", replacement = "", exclusion = c(),
  complete_match = TRUE, append = FALSE)

Arguments

x

Input data frame. It can contain also non-numeric columns.

base

Base number for which you will calculate the exponential value. Default value is 2.

sub

Character string to substitute in column names. Default is empty

replacement

Character string to replace the substituted one. Default is empty.

exclusion

Vector containing labels from the columns that should be excluded. Even a part of the label is enough.

complete_match

Logical with default value TRUE. If exclusion vector contains exactly the column names of the excluded columns, leave the complete_match to TRUE. For partial matching of the columns switch to FALSE.

append

Logical with default value FALSE. If set TRUE processed data will be added in the starting dataframe. If TRUE, the processed columned will be merged only with the excluded ones.

Examples

1
2
3
4
5
6
y1 <- calc_exp_df(x = my_data,
                  base = 2,
                  sub = "norm_log_",
                  replacement = "norm_",
                  exclusion = colnames(y)[1:3],
                  complete_match = TRUE)

tkostas/komics documentation built on May 24, 2019, 7:31 a.m.