View source: R/print_importance.R
| print_importance | R Documentation | 
Prints variable importance scores from rf, rf_repeat, and rf_spatial models.
print_importance( model, verbose = TRUE )
| model | A model fitted with rf, rf_repeat, or rf_spatial. | 
| verbose | Logical, if  | 
A table printed to the standard output.
plot_importance(), get_importance()
if(interactive()){
#loading example data
data(plant_richness_df)
data(distance.matrix)
#fitting a random forest model
rf.model <- rf(
  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,
  verbose = FALSE
)
#printing variable importance scores
print_importance(model = rf.model)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.