Re: [R] shorter way of coding

2011-12-13 Thread Mintewab Bezabih
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 example. Paul suggested a list

Re: [R] shorter way of coding

2011-12-13 Thread Sarah Goslee
) 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-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

[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

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 mintewab.beza...@economics.gu.se wrote: Dear R users, I am using the code below to generate a fitted value of b.

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 for

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 that ?

Re: [R] shorter way of coding

2011-12-12 Thread Mintewab Bezabih
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 fitted value of b. I have about 300

Re: [R] shorter way of coding

2011-12-12 Thread Sarah Goslee
: 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 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

Re: [R] shorter way of coding

2011-12-12 Thread Mintewab Bezabih
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 fitted value of b. I have about 300