dat <- loadDataSet("Iris")
pca <- embed(dat, "PCA")
rot_pca <- getRotationMatrix(pca)
scale(getData(dat), TRUE, FALSE) %*% rot_pca - getData(getDimRedData(pca))
if(requireNamespace("fastICA", quietly = TRUE)) {
ica <- embed(dat, "FastICA")
rot_ica <- getRotationMatrix(ica)
scale(getData(dat), TRUE, FALSE) %*% rot_ica - getData(getDimRedData(ica))
}
Run the code above in your browser using DataLab