On Fri, Jul 04, 2008 at 04:44:53PM +1000, Andrew Robinson wrote:
> Hi Keld
>
> you should read ?sum.
>
> sum(c(1,2,NA), na.rm=TRUE)
Thanks, that solved my problem.
Best regars
keld
> Cheers
>
> Andrew
>
> On Fri, Jul 04, 2008 at 08:29:34AM +0200, Keld J?rn Simonsen wrote:
> > Hi
> >
> > I
try
is.na()
regards,
Albert
Am Freitag, den 04.07.2008, 08:29 +0200 schrieb 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
3286 7700
mailto:[EMAIL PROTECTED]
http://www.cmis.csiro.au/bill.venables/
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keld Jørn
Simonsen
Sent: Friday, 4 July 2008 4:30 PM
To: r-help@r-project.org
Subject: [R] problem with NA and if
Hi
I would li
Hi Keld
you should read ?sum.
sum(c(1,2,NA), na.rm=TRUE)
Cheers
Andrew
On Fri, Jul 04, 2008 at 08:29:34AM +0200, Keld J?rn Simonsen wrote:
> 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 res
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 == NA)
5 matches
Mail list logo