0
> To: r-help@r-project.org
> Subject: [R] Summarizing elements for a data.frame
>
> Hello again, let say we have following data:
>
> Dat1 <- structure(list(factor.sample.LETTERS.1.3...6..replace...T.. =
> structure(c(1L,
> 3L, 2L, 1L, 3L, 3L), .Label = c("A",
a b
#A 4 3
#B 3 NA
#C 6 7
A.K.
- Original Message -
From: Christofer Bogaso
To: r-help
Cc:
Sent: Tuesday, December 18, 2012 9:36 AM
Subject: [R] Summarizing elements for a data.frame
Hello again, let say we have following data:
Dat1 <- structure(list(factor.sam
Hi Christofer,
Check ?tapply, ?aggregate and ?ave. Here is a way of doing in using the
first function:
tapply(Dat1[, 3], list(Dat1[,1], Dat1[,2]), sum, na.rm = TRUE)
HTH,
Jorge.-
On Wed, Dec 19, 2012 at 1:36 AM, Christofer Bogaso <> wrote:
> Dat1 <- structure(list(factor.sample.LETTERS.1.3..
3 matches
Mail list logo