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
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.030239833
[4,] NA NA NA
[5,] 0.008746356 0.02848576 -0.0255661
3 matches
Mail list logo