[Rd] length-0 list as dimnames

From: Benilton Carvalho <beniltoncarvalho_at_gmail.com>
Date: Wed, 06 Jun 2012 00:37:06 +0100


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,


R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue 05 Jun 2012 - 23:39:58 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 06 Jun 2012 - 00:12:08 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive