just.pca: just.pca

Description Usage Arguments Value

Description

Takes Tidy data and Generates pca.object that retains information of original data.

Usage

1
2
just.pca(tidydata, y, x, value.var, scale = FALSE, num.degrees = 5,
  invert = FALSE)

Arguments

tidydata

Tidy data input

y

column name(s) or index(es) of columns whose interaction is used as y component of formula in dcast's formula = y~x. y or the interaction of columns passed to y becomes the 'individuals' of the pca. This interaction forms an 'id.col' that is added to the original data frame and used to join pca components and the original data frame.

x

column name(s) or index(es) of columns whose interaction is used as y component of formula in dcast's formula = y~x. x or the interaction of columns passed to x becomes the 'variables' of the pca.

value.var

Character string of name of column which stores values.

scale

Logical, scales the variables to have the same unit variance. Default set to FALSE.

num.degrees

Integer that determines the number of principal components to join to the orginal data frame. Default set to 5.

invert

Logical, determines if mean centering should be inverted or not. Default set to FALSE.

Value

returns pca object that is a list of "data","loadings","values", "covariance","contribution"


jtlandis/justinmisc documentation built on May 25, 2019, 8:18 a.m.