[R] Re: cannot assign dimnames

Peter Dalgaard p.dalgaard at biostat.ku.dk
Mon Sep 27 22:28:59 CEST 2004


"Dan Bebber" <danbebber at forestecology.co.uk> writes:

> Dear list,
> 
> Please ignore my earlier message on this topic. I was under the mistaken
> impression that dimnames() named the dimensions themselves, rather than the
> indices within the dimensions.

The dimnames list can be named though:

> matrix(1:4,2,dimnames=list(foo=1:2,bar=c(10,20)))
   bar
foo 10 20
  1  1  3
  2  2  4


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list