Skip to content
Back to formatted view

Raw Message

Message-ID: <1054732912.2712.1.camel@christophl>
Date: 2003-06-04T13:21:52Z
From: Christoph Lehmann
Subject: simple matrix question

what is the easiest way to get from 
> x
     x1 x2
[1,]  2  3
[2,]  3  2
[3,]  1  3
[4,]  1  4

the matrix xbar

> xbar1
       x1 x2
[1,] 1.75  3
[2,] 1.75  3
[3,] 1.75  3
[4,] 1.75  3

with the mean of the columns of x as values?

thanks

christoph

-- 
Christoph Lehmann <lehmann at puk.unibe.ch>
University Hospital of Clinical Psychiatry