View source: R/plot_training_df.R
plot_training_df | R Documentation |
Plots the dependent variable against each predictor.
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" )
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 |
A wrap_plots object.
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] ) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.