From b.fischer at dkfz-heidelberg.de  Wed Apr 29 20:22:44 2015
From: b.fischer at dkfz-heidelberg.de (Fischer, Bernd)
Date: Wed, 29 Apr 2015 20:22:44 +0200
Subject: [Rd] dimnames returned by function apply
Message-ID: <99ED4CB4-AF79-421F-B7A0-3BBFB8F5FCD6@dkfz.de>

Dear all,

I noticed that the dimnames returned by apply are different in the new release.

In the following example. The returned row-names are c(?S?,?T?), but shouldn?t they be c(?X?,?Y?) as in the old release?

Best,

Bernd

>X = array(1:8, dim=c(4,2))
>dimnames(X) = list(c("A","B","C","D"),c("S","T"))
>apply(X, 1, function(x) { c(X=x[1]*5,Y=x[2]*5) } )

   A  B  C  D
S  5 10 15 20
T 25 30 35 40

> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-apple-darwin14.3.0 (64-bit)
Running under: OS X 10.10.3 (Yosemite)

locale:
[1] de_DE.UTF-8/de_DE.UTF-8/de_DE.UTF-8/C/de_DE.UTF-8/de_DE.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     



[Rd] dimnames returned by function apply
Fischer, Bernd