[R] problem with NA and if

2008-07-04 Thread Keld Jørn Simonsen
Hi I would like to sum a number of time series, some of them having NA's Standard action is here that if I sum a value with a NA, then the result is NA. I would like it to just keep the value. I then try to: a = NA; if (a == NA) { a = 0} just to try it out, but it says Error in if (a ==

Re: [R] problem with lm and predict - no predictions made

2008-07-03 Thread Keld Jørn Simonsen
On Wed, Jul 02, 2008 at 08:55:54PM -0500, Erik Iverson wrote: Hello - Keld Jørn Simonsen wrote: Hi I have a problem with lm and predict I have us [1] 2789.53 3128.43 3255.03 3536.68 3933.18 4220.25 4462.83 4739.48 [9] 5103.75 5484.35 5803.08 5995.93 6337.75 6657.40

[R] problem with lm and predict - no predictions made

2008-07-02 Thread Keld Jørn Simonsen
Hi I have a problem with lm and predict I have us [1] 2789.53 3128.43 3255.03 3536.68 3933.18 4220.25 4462.83 4739.48 [9] 5103.75 5484.35 5803.08 5995.93 6337.75 6657.40 7072.23 7397.65 [17] 7816.83 8304.33 8746.98 9268.43 9816.98 10127.95 10469.60 10960.75 [25] 11685.93