plot_training_df {spatialRF} | R Documentation |
Scatterplots of a training data frame
Description
Plots the dependent variable against each predictor.
Usage
plot_training_df(
data = NULL,
dependent.variable.name = NULL,
predictor.variable.names = NULL,
ncol = 4,
method = "loess",
point.color = viridis::viridis(100, option = "F"),
line.color = "gray30"
)
Arguments
data |
Data frame with a response variable and a set of predictors. Default: |
dependent.variable.name |
Character string with the name of the response variable. Must be in the column names of |
predictor.variable.names |
Character vector with the names of the predictive variables. Every element of this vector must be in the column names of |
ncol |
Number of columns of the plot. Argument |
method |
Method for geom_smooth, one of: "lm", "glm", "gam", "loess", or a function, for example |
point.color |
Colors of the plotted points. Can be a single color name (e.g. "red4"), a character vector with hexadecimal codes (e.g. "#440154FF" "#21908CFF" "#FDE725FF"), or function generating a palette (e.g. |
line.color |
Character string, color of the line produced by |
Value
A wrap_plots object.
Examples
if(interactive()){
#load example data
data(plant_richness_df)
#scatterplot of the training data
plot_training_data(
data = plant_richness_df,
dependent.variable.name = "richness_species_vascular",
predictor.variable.names = colnames(plant_richness_df)[5:21]
)
}