View source: R/get_spatial_predictors.R
| get_spatial_predictors | R Documentation | 
Returns spatial predictors from a model fitted with rf_spatial() in order of importance.
get_spatial_predictors(model)
| model | A model fitted with  | 
A data frame with the spatial predictors included in the model.
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 = c(0, 1000),
   n.cores = 1,
   method = "mem.moran.sequential"
 )
#getting data frame with the selected spatial predictors
spatial.predictors <- get_spatial_predictors(model)
head(spatial.predictors)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.