View source: R/ImputeRegressionMulti.R
OneComp | R Documentation |
Rows with any missing elements give corresponding missing values in output.
OneComp(
data,
variables = 1:dim(data)[2],
method = c("mean", "pca", "pcaMedian", "pcaStd")
)
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. |
A single component is retuned as a vector. This component is scaled to be a weighted row-sum of input so that sum(abs(weights))=1.
OneComp(matrix(rnorm(15),5,3),method="pca")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.