Re: [R] shorter way of coding

2011-12-13 Thread Mintewab Bezabih
Thanks so much Sarah. Everything worked now! Mintewab Från: Sarah Goslee [sarah.gos...@gmail.com] Skickat: den 13 december 2011 17:36 Till: Mintewab Bezabih Kopia: r-help@r-project.org Ämne: Re: [R] shorter way of coding In exactly the same way: y.gam

Re: [R] shorter way of coding

2011-12-13 Thread Sarah Goslee
gam(b) and fitted (b) into my new code? > > b<-gam(y~s(x1,x2,k=100),data=dat) > vis.gam(b) > fitted(b) > > Many thanks once again. > Mintewab > > Från: Sarah Goslee [sarah.gos...@gmail.com] > Skickat: den 12 december 2011 17:36

Re: [R] shorter way of coding

2011-12-13 Thread Mintewab Bezabih
ata=dat) vis.gam(b) fitted(b) Many thanks once again. Mintewab Från: Sarah Goslee [sarah.gos...@gmail.com] Skickat: den 12 december 2011 17:36 Till: Mintewab Bezabih Kopia: r-help@r-project.org Ämne: Re: [R] shorter way of coding That's not a reproducible

Re: [R] shorter way of coding

2011-12-12 Thread Mintewab Bezabih
Från: Paul Hiemstra [paul.hiems...@knmi.nl] Skickat: den 12 december 2011 14:42 Till: Mintewab Bezabih Kopia: r-help@r-project.org Ämne: Re: [R] shorter way of coding On 12/12/2011 01:16 PM, Mintewab Bezabih wrote: > Dear R users, > > I am using the code below to generate a fit

Re: [R] shorter way of coding

2011-12-12 Thread Sarah Goslee
Från: Paul Hiemstra [paul.hiems...@knmi.nl] > Skickat: den 12 december 2011 14:42 > Till: Mintewab Bezabih > Kopia: r-help@r-project.org > Ämne: Re: [R] shorter way of coding > > On 12/12/2011 01:16 PM, Mintewab Bezabih wrote: >> Dear R users, >> >> I am using the co

Re: [R] shorter way of coding

2011-12-12 Thread Mintewab Bezabih
Från: Paul Hiemstra [paul.hiems...@knmi.nl] Skickat: den 12 december 2011 14:42 Till: Mintewab Bezabih Kopia: r-help@r-project.org Ämne: Re: [R] shorter way of coding On 12/12/2011 01:16 PM, Mintewab Bezabih wrote: > Dear R users, > > I am using the code below to generate a fit

Re: [R] shorter way of coding

2011-12-12 Thread Petr PIKAL
Hi > > Dear R users, > > I am using the code below to generate a fitted value of b. I have about > 300 different values for for y (y1, y2, ...y300) which means I will have > to write the code below 300 times to generate the 300 different fitted > values for y. Is there a short way of doing t

Re: [R] shorter way of coding

2011-12-12 Thread Paul Hiemstra
On 12/12/2011 01:16 PM, Mintewab Bezabih wrote: > Dear R users, > > I am using the code below to generate a fitted value of b. I have about 300 > different values for for y (y1, y2, ...y300) which means I will have to write > the code below 300 times to generate the 300 different fitted values f

Re: [R] shorter way of coding

2011-12-12 Thread Sarah Goslee
This isn't a reproducible example, so I can't provide code, but I would put all the y variables in a list and use lapply(). Sarah On Mon, Dec 12, 2011 at 8:16 AM, Mintewab Bezabih wrote: > Dear R users, > > I am using the code below to generate a fitted value of b. I have about 300 > different

[R] shorter way of coding

2011-12-12 Thread Mintewab Bezabih
Dear R users, I am using the code below to generate a fitted value of b. I have about 300 different values for for y (y1, y2, ...y300) which means I will have to write the code below 300 times to generate the 300 different fitted values for y. Is there a short way of doing that ? Many thanks