#models as returned by buildGAM(): plotPartials2 = function(models, index) { model1 = unserialize(models[[index]]) model2 = unserialize(models[[index+1]]) par(las=1, mfrow=c(2,3)) for (i in 1:6) { #TODO: yRange = ... plot(model1, select = i, col=2, col.axis=2)#, ylim=yRange) par(new=TRUE) plot(model2, select = i)#, ylim=yRange) } } plotPartials = function(models, index) { model = unserialize(models[[index]]) par(las=1, mfrow=c(2,3)) for (i in 1:6) plot(model, select = i) }