Skip to content
Prev 280185 / 398506 Next

shorter way of coding

Thanks so much Sarah. Everything worked now!

Mintewab
________________________________________
Fr?n: Sarah Goslee [sarah.goslee at gmail.com]
Skickat: den 13 december 2011 17:36
Till: Mintewab Bezabih
Kopia: r-help at r-project.org
?mne: Re: [R] shorter way of coding

In exactly the same way:

y.gam <- lapply(y.list, function(y)gam(y~s(x1,x2, k=1))) # list of gam objects
y.vis.gam <- lapply(y.gam, vis.gam) # list of vis.gam outputs
y.fitted <- lapply(y.gam, fitted) # list of fitted values.

Saraj

On Tue, Dec 13, 2011 at 10:48 AM, Mintewab Bezabih
<Mintewab.Bezabih at economics.gu.se> wrote:
--
Sarah Goslee
http://www.functionaldiversity.org