Re: [R] newbie question: ROW average

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Mon 29 May 2006 - 23:12:51 EST

A Ezhil <ezhil02@yahoo.com> writes:

> When I tried with (assuming 'M' is my old matrix):
>
> dim(M) <- c(4,248,74)
> mn <- apply(M, c(2,3), mean)
>
> the following error occured:
> Error: dim<- : dims [product 73408] do not match the
> length of object [74]

In that case, M clearly wasn't a 992x74 matrix!

-- 
   O__  ---- Peter Dalgaard             ุster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)                  FAX: (+45) 35327907

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Mon May 29 23:20:56 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 30 May 2006 - 00:10:24 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.