Try this:
a$a4 <- rowSums(a, na.rm = T)
On Tue, Sep 23, 2008 at 12:20 PM, ravi <[EMAIL PROTECTED]> wrote:
> Hi all,
> When I try to sum a few columns in a data frame (which has NA's randomly
> distributed as elements), I am not able to get the summing operation to
> ignore the NA's.
> Let me ex
Hi all,
When I try to sum a few columns in a data frame (which has NA’s randomly
distributed as elements), I am not able to get the summing operation to ignore
the NA’s.
Let me explain with the following code :
a<-structure(list(a1 = c(NA, 2, 3, NA, 5, 6, NA, 8,
2 matches
Mail list logo