[R] Can't Destroy Dim Names

clangkamp christian.langkamp at gmxpro.de
Wed Dec 1 00:07:40 CET 2010


Dear Jim
I think the target is to get from a Named chr to a just chr
>> str(mat) 
> Named chr [1:32268] "yQAAA" "jQAAQ" "UQAAg" "FQAAw" "1QABA" ... 
>  - attr(*, "names")= chr [1:32268] "CAAAAAAAAA" "CAAAAAAAAC" 
> "CAAAAAAAAG" "CAAAAAAAAT" ... 

I have presumably the same problem
> str(DC1a)
 num [1:18, 1:48, 1:35] 3124.4 3049.2 227.8 41.4 76 ...
 - attr(*, "dimnames")=List of 3
  ..$ Figure  : Named chr [1:18]  "CDS1" ...
  .. ..- attr(*, "names")= chr [1:18] "1" 
  ..$ Code    : Named chr [1:48] "AGR"   
.. ..- attr(*, "names")= chr [1:48] "1" "36" "71" "106" ...
  ..$ variable: Named chr [1:35] "X30.09.2009" "  
.. ..- attr(*, "names")= chr [1:35] "1" "2" "3" "4" ...
> DC1_SM<-abind(DC1a, DC1_PLCF_SM1, along=1, new.names=)
> str(DC1_SM)
 num [1:24, 1:48, 1:35] 3124.4 3049.2 227.8 41.4 76 ...
 - attr(*, "dimnames")=List of 3
  ..$ : chr [1:24]  "CDS1" ...
  ..$ : chr [1:48] "AGR"   
  ..$ : chr [1:35] "X30.09.2009" "

names(dimnames(DC1_PLCF_SM1))<-names(dimnames(DC1a))

The point is to kill the lines with the bit
.. ..- attr(*, "names")= chr [1:35] "1" "2" "3" "4" ...
and change the "Named chr" into a plain chr.

-----
Christian Langkamp
christian.langkamp-at-gmxpro.de

-- 
View this message in context: http://r.789695.n4.nabble.com/Can-t-Destroy-Dim-Names-tp876633p3066413.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list