Skip to Content

individual gam plots in r

I have used a generalized additive model to analyse some data and now wish to plot the outcome.

set.seed(2) ## simulate some data... 
dat <- gamSim(1,n=400,dist="normal",scale=2)
b <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),data=dat)

From the example above, how is it possible to save the individual plots into different pdf files?