View source: R/prepare_importance_spatial.R
| prepare_importance_spatial | R Documentation |
Prepares variable importance data frames and plots for models fitted with rf_spatial().
prepare_importance_spatial(model)
model |
An importance data frame with spatial predictors, or a model fitted with |
A list with importance data frames in different formats depending on whether the model was fitted with rf() or rf_repeat().
if(interactive()){
#loading example data
data(distance_matrix)
data(plant_richness_df)
#fittind spatial model
model <- rf_spatial(
data = plant_richness_df,
dependent.variable.name = "richness_species_vascular",
predictor.variable.names = colnames(plant_richness_df)[5:21],
distance.matrix = distance_matrix,
distance.thresholds = 0,
n.cores = 1
)
#preparing the importance data frame
importance <- prepare_importance_spatial(model)
names(importance)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.