gbm.lmplots {gbm.auto}R Documentation

Plot linear models for all expvar against the resvar

Description

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.

Usage

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",
  ...
)

Arguments

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 &.

Details

Errors and their origins:

Value

Invisibly saves png plots into savedir.

Author(s)

Simon Dedman, simondedman@gmail.com


[Package gbm.auto version 2023.08.31 Index]