From beniltoncarvalho at gmail.com  Wed Jun  6 01:37:06 2012
From: beniltoncarvalho at gmail.com (Benilton Carvalho)
Date: Wed, 6 Jun 2012 00:37:06 +0100
Subject: [Rd] length-0 list as dimnames
Message-ID: <CAO-arWNY1CBgpYND748v-796BR7SoctfeghZYAixdqJzq=3D=w@mail.gmail.com>

Hi,

I'm working on a package and observed a behaviour that was suggested
to be incompatible with the documentation.

The code below:

x <- matrix(1:4, 2)
dimnames(x) <- list()

works just fine. But checking the documentation for dimnames(), it
states that if value is a list "its components are either 'NULL' or a
character vector with positive length of the appropriate dimension of
x".

Should dimnames() return an error on the example above?

Thank you very much for your attention and time,

benilton



[Rd] length-0 list as dimnames
Benilton Carvalho