View source: R/plotRespVsPred.r
plotRespVsPred | R Documentation |
Takes a response variable (e.g., a macroinvertebrate or fish IBI) and plots it against a number of predictor variables.
plotRespVsPred(dfm, resp, pred)
dfm |
the dataset containing the predictor and response variables |
resp |
the name of the response variable within the data frame, as a string |
pred |
a vector of the column numbers of the predictors or the names as strings |
Creates faceted scatterplots with each predictor as a facet, the correlation coefficient plotted in the corner, and the facets sorted in decreasing correlation strength.
Faceted scatterplots of each predictor vs. the response
plotRespVsPred(mtcars, 'mpg', c('hp', 'wt', 'disp'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.