perform_pca: Performing PCA analysis

Description Usage Arguments Value

View source: R/perform_pca.R

Description

Performing PCA analysis

Usage

1
2
perform_pca(data, sampleID = "sample_name", variable, value = "value",
  scale = "UV", center = TRUE, convert.NA = FALSE, print = TRUE)

Arguments

data

dataframe; data to be used for PCA. Sample metadata is in columns and the variables involved (i.e. compound or species)

sampleID

string. column name for sampleID. Default 'sample_name'

variable

string; the column name in which variables are stored

value

string; default 'value'; the column name in which data values are stored (i.e. 'concentration' or 'abundance')

scale

'UV' for unit variance, 'UVN' for no unit variance, 'pareto'; default UV

center

logical; mean centering; default to TRUE

convert.NA

logical; where value is NA, convert value to 0; desirable when want to explicitly say missing values are true zeros (i.e. below limit of detection) and not missing from analysis

print

logic. Default TRUE. print preview of pca results

Value

prcomp object; PCA-processed data


schyen/somefxns documentation built on Aug. 6, 2019, 2:26 p.m.