| set.mgcv.options | R Documentation |
Allows convenient setting and clearing of mgcv options. Options are set using options after having mgcv. appended to the front of the option name. NULL leads to function defined defaults being used.
set.mgcv.options(vc.logrange=25,s.bs=NULL,xt=NULL,te.bs=NULL,te.np=NULL,
ti.mc=NULL,gam.method=NULL,gam.optimizer=NULL,bam.discrete=NULL,plot.scheme=NULL)
vc.logrange |
used by |
s.bs |
default |
xt |
default |
te.bs |
default |
te.np |
logical indicating whether |
ti.mc |
default |
gam.method |
default |
gam.optimizer |
default |
bam.discrete |
default |
plot.scheme |
default plot |
Some mgcv defaults can usefully be reset: for example the gam default method is GCV for back-compatibulity and REML is usually better. This routine facilitiates this.
Value returned by options.
Simon N. Wood simon.wood@r-project.org
library(mgcv)
set.seed(2) ## simulate some data...
dat <- gamSim(1,n=400,dist="normal",scale=2)
set.mgcv.options(gam.method="REML",plot.scheme=2)
b <- gam(y~s(x0)+s(x1)+te(x2,x3),data=dat)
b
plot(b,pages=1)
set.mgcv.options() ## reset to 'factory fresh'
b <- gam(y~s(x0)+s(x1)+te(x2,x3),data=dat)
b
plot(b,pages=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.