gbm.lmplots | R Documentation |
Loops the lmplot function, shows linear model plots for all expvar against the resvar. Good practice to do this before running gbm.auto so you have a sense of the basic relationship of the variables.
gbm.lmplots(
samples = NULL,
expvar = NULL,
resvar = NULL,
expvarnames = NULL,
resvarname = NULL,
savedir = NULL,
plotname = NULL,
pngtype = c("cairo-png", "quartz", "Xlib"),
r2line = TRUE,
pointtext = FALSE,
pointlabs = resvar,
pointcol = "black",
...
)
samples |
Explanatory and response variables to predict from. Keep col names short (~17 characters max), no odd characters, spaces, starting numerals or terminal periods. Spaces may be converted to periods in directory names, underscores won't. Can be a subset of a large dataset. |
expvar |
Vector of names or column numbers of explanatory variables in 'samples': c(1,3,6) or c("Temp","Sal"). No default. |
resvar |
Name or column number(s) of response variable in samples: 12, c(1,4), "Rockfish". No default. Column name is ideally species name. |
expvarnames |
Vector of names same length as expvar, if you want nicer names. |
resvarname |
Single character object, if you want a nicer resvar name. |
savedir |
Save location, end with "/". |
plotname |
Character vector of plot names else expvarnames else expvar will be used. |
pngtype |
Filetype for png files, alternatively try "quartz" on Mac. |
r2line |
Plot rsquared trendline, default TRUE. |
pointtext |
Label each point? Default FALSE. |
pointlabs |
Point labels, defaults to resvar value. |
pointcol |
Points colour, default "black". |
... |
Allows controlling of text label params e.g. adj cex &. |
Errors and their origins:
Invisibly saves png plots into savedir.
Simon Dedman, simondedman@gmail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.