Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/gx.rqpca.save.R
Function to save PCA matrices following computations by functions gx.mva
, gx.mva.closed
, gx.robmva
, gx.robmva.closed
or gx.rotate
as ‘.csv’ files. By default appropriate files names are generated and the files saved in the Working Directory.
1 2 |
save |
a saved object from any of functions |
ifload |
if |
ifcntrb |
if |
ifscore |
if |
file |
the name of the folder where the files are to be saved, a ‘/’ is appended before the synthesized file name, details of which are displayed on the current device. If no file is specified, the files are saved to the Working Directory. |
By default the PCA matrices are saved to the Working Directory with a synthesized file name consisting of the name of the saved object from which the matrices are sourced and an appropriate identifying suffix and ‘.csv’. If a folder name has been provided in file
, a ‘/’ is appended prior to the synthesized file name. As each matrix is saved its file name is displayed on the current device. When the saved object is from gx.rotate
and is the input object both the original and Varimax loadings and PC scores will be saved by default.
The last saved table, table.rows
, is returned and may be saved as an object if required.
Robert G. Garrett
gx.mva
, gx.mva.closed
, gx.robmva
, gx.robmva.closed
, gx.rotate
.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Make test data available
data(sind.mat2open)
## Estimate and save robust PCA loadings and scores
sind.save <- gx.robmva.closed(sind.mat2open)
gx.rqpca.save(sind.save)
## NOTE: the example below is commented out
## Save PCA scores for future use
## gx.rqpca.save(sind.save, ifcntrb = TRUE, file = "D:\R_work\Project3")
## Clean-up
rm(sind.save)
|
Loading required package: MASS
Loading required package: fastICA
** Are the data/parts all in the same measurement units? **
n = 25 nc = 15 p = 6 nc/p = 2.5
*** Proceed with Care, Core Size is < 5p ***
*** Proceed With Great Care, nc = 15 , which is < 3p ***
Eigenvalues: 1.684 1.315 0.9192 0.6199 0.4622 1.038e-16
as %ages: 33.7 26.3 18.4 12.4 9.2 0
Score S^2s : 2.45 2.913 18.14 8.072 2.654 3.192e-17
as %ages: 7.2 8.5 53 23.6 7.8 0
PCA matrices for sind.save
Source data matrix: sind.mat2open
PC loadings have been saved in:
/work/tmp/sind.save_PC-loadings.csv
PC scores have been saved in:
/work/tmp/sind.save_PC-scores.csv
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.