df_tidy: Tidy data into correct format before analysis

Description Usage Arguments Examples

View source: R/mpred_function.R

Description

This function transpose the original dataset to each row as one sample, each column as one metabolite predictor

Usage

1
df_tidy(df, standardize = "none")

Arguments

df

dataframe

standardize

standardizaton method Default to none. options are z-score, mean-subtraction and none

Examples

1
2
3
4
5
list <- subset_data(df1 = RC12, df1_sampleinfo = RC12_sampleinfo, df2 = RC18, df2_sampleinfo = RC18_sampleinfo, df1_sample_name = "SAMPLE_NAME",  df2_sample_name = "SAMPLE_NAME")
RC12_tumor_match <- list[[1]]
RC18_tumor_match <- list[[2]]
t_RC12_tumor <- df_tidy( RC12_tumor_match, standardize = "z")
t_RC18_tumor <- df_tidy( RC18_tumor_match, standardize = "z")

czang97/mpred documentation built on July 9, 2019, 2:38 p.m.