Skip to content

accessing dimension names

4 messages · A, PIKAL Petr, jim holtman +1 more

#
Hi

r-help-bounces at r-project.org napsal dne 18.12.2007 12:01:41:
on.
dimnames(y)$paste('x',idx,sep='')
Why not

dimnames(y)[idx]

Regards
Petr
http://www.R-project.org/posting-guide.html
#
dimnames(y)[[paste('x', idx, sep="")]]
On Dec 18, 2007 6:01 AM, <born.to.b.wyld at gmail.com> wrote:

  
    
#
To access your dimension idx you could do either
assign("a",paste("dimnames(y)$x",idx,sep=""))
or
eval(parse(text=paste("a<-dimnames(y)$x",idx,sep="")))
--- born.to.b.wyld at gmail.com wrote: