nmr_pca_build_model | R Documentation |
This function builds a PCA model with all the NMR spectra. Regions with zero values (excluded regions) or near-zero variance regions are automatically excluded from the analysis.
nmr_pca_build_model(
nmr_dataset,
ncomp = NULL,
center = TRUE,
scale = FALSE,
...
)
## S3 method for class 'nmr_dataset_1D'
nmr_pca_build_model(
nmr_dataset,
ncomp = NULL,
center = TRUE,
scale = FALSE,
...
)
nmr_dataset |
a nmr_dataset_1D object |
ncomp |
Integer, if data is complete |
center |
(Default=TRUE) Logical, whether the variables should be shifted
to be zero centered. Only set to FALSE if data have already been centered.
Alternatively, a vector of length equal the number of columns of |
scale |
(Default=FALSE) Logical indicating whether the variables should be
scaled to have unit variance before the analysis takes place. The default is
|
... |
Additional arguments passed on to mixOmics::pca |
A PCA model as given by mixOmics::pca with two additional attributes:
nmr_data_axis
containing the full ppm axis
nmr_included
with the data points included in the model
These attributes are used internally by AlpsNMR to create loading plots
Other PCA related functions:
nmr_pca_outliers()
,
nmr_pca_outliers_filter()
,
nmr_pca_outliers_plot()
,
nmr_pca_outliers_robust()
,
nmr_pca_plots
dir_to_demo_dataset <- system.file("dataset-demo", package = "AlpsNMR")
dataset <- nmr_read_samples_dir(dir_to_demo_dataset)
dataset_1D <- nmr_interpolate_1D(dataset, axis = c(min = -0.5, max = 10, by = 2.3E-4))
model <- nmr_pca_build_model(dataset_1D)
dir_to_demo_dataset <- system.file("dataset-demo", package = "AlpsNMR")
dataset <- nmr_read_samples_dir(dir_to_demo_dataset)
dataset_1D <- nmr_interpolate_1D(dataset, axis = c(min = -0.5, max = 10, by = 2.3E-4))
model <- nmr_pca_build_model(dataset_1D)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.