See ?colSums
On Mon, May 10, 2010 at 12:44 AM, vincent.deluard
wrote:
>
> Hi R users,
>
> I have a matrix "m" of the type:
>
> m
> X4.20.2010 X4.19.2010 X4.16.2010
> [1,] 0.008319468 0. -0.008250825
> [2,] 0.005574136 0.01816118 0.073081608
> [3,] -0.047830688 0.01612903 -0.030
It is exactly the same
tmp <- matrix(1:24,6,4)
tmp[4,] <- NA
tmp
apply(tmp, 2, sum, na.rm=TRUE)
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting gu
you must have missing values in "data". Try
tapply(data, group, mean, na.rm = TRUE)
If that's not the case, read the bottom of this email about the posting guide.
HTH,
--sundar
On Tue, Nov 3, 2009 at 5:28 AM, FMH wrote:
> Hi,
>
> I tried to use tapply function to find the mean of the data in
3 matches
Mail list logo