Skip to content
Back to formatted view

Raw Message

Message-ID: <20090322041729.6LTZR.3025252.root@mp11>
Date: 2009-03-22T08:17:29Z
From: rkevinburton at charter.net
Subject: variance/mean

At the risk of appearing ignorant why is the folowing true?

o <- cbind(rep(1,3),rep(2,3),rep(3,3))
var(o)
     [,1] [,2] [,3]
[1,]    0    0    0
[2,]    0    0    0
[3,]    0    0    0

and

mean(o)
[1] 2

How do I get mean to return an array similar to var? I would expect in the above example a vector of length 3 {1,2,3}.

Thank you for your help.

Kevin