View source: R/pca_predictors.R
pca_predictors | R Documentation |
Transform predictors data into PCA-axes.
pca_predictors(i, cumulative_proportion = 0.99)
pca_summary(i)
get_pca_model(i)
i |
A |
cumulative_proportion |
A |
pca_predictors
Transform predictors data into PCA-axes. If the user wants to use PCA-axes
as future scenarios, then scenarios should be added after the PCA transformation (see examples).
pca_summary
Returns the summary of prcomp
function. See ?stats::prcomp.
get_pca_model
Returns the model built to calculate PCA-axes.
input_sdm
object with variables from both predictors
and scenarios
transformed in PCA-axes.
Luíz Fernando Esser (luizesser@gmail.com) https://luizfesser.wordpress.com
vif_predictors sdm_area add_scenarios add_predictors
# Create sdm_area object:
sa <- sdm_area(parana, cell_size = 50000, crs = 6933)
# Include predictors:
sa <- add_predictors(sa, bioc) |> select_predictors(c("bio1", "bio12"))
# Create occurrences:
oc <- occurrences_sdm(occ, crs = 6933) |> join_area(sa)
# Create input_sdm:
i <- input_sdm(oc, sa)
# PCA transformation:
i <- pca_predictors(i)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.