[R] accessing arrays

Wolfgang Raffelsberger wraff at titus.u-strasbg.fr
Wed Jan 3 17:59:02 CET 2007


try this :
x <- 
array(1:24,dim=c(2,3,4),dimnames=list(letters[1:2],LETTERS[1:3],letters[23:26]))

Cheers,
Wolfgang

downunder03 a écrit :
> hi all. how can i adress a array directly. for example i wanna give array 1
> other labels than array 2. How can I overcome this problem?
>
> ...this doesn't work
>
> tab <- array(1:8, c(2, 2, 2))
> dimnames(tab[,,1]) <- list(c("No","Yes"), c("No","Yes"),c("ARRAY1"))
> dimnames(tab[,,2]) <- list(c("big","small"), c("small","big"),c("ARRAY2"))
>
>
>
>   


 

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. . . . .

Wolfgang Raffelsberger, PhD
Laboratoire de BioInformatique et Génomique Intégratives
IGBMC
1 rue Laurent Fries,  67404 Illkirch  Strasbourg,  France
Tel (+33) 388 65 3314         Fax (+33) 388 65 3276
wolfgang.raffelsberger at igbmc.u-strasbg.fr



More information about the R-help mailing list