INTERNAL FUNCTION: Extract a single component from multivariate data
OneComp.Rd
Rows with any missing elements give corresponding missing values in output.
Arguments
- data
Data frame or matrix containing the variables
- variables
Indices of variables to extract component from
- method
Method coded as a string: "mean" (default),"pca","pcaMedian" or "pcaStd" where: "mean" means rowMeans. "pcaMedian" means pca/svd on data scaled by median of absolute values. "pcaStd" means pca/svd on data centered and scaled by st.dev.