Prepares variable importance data frames and plots for models fitted with rf_spatial().

prepare_importance_spatial(model)

Arguments

model

An importance data frame with spatial predictors, or a model fitted with rf_spatial().

Value

A list with importance data frames in different formats depending on whether the model was fitted with rf() or rf_repeat().

Examples

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)

}