[COL/ROW]NAMES -> [col/row]names with new arg..

Martin Maechler Martin Maechler <maechler@stat.math.ethz.ch>
Thu, 12 Nov 1998 10:33:54 +0100

R-devel subscribers:  this came from R-core,
		      but may interest you....

>>>>> "MM" == Martin Maechler <maechler@stat.math.ethz.ch> writes:

>>>>> "Ross" == Ross Ihaka <ihaka@stat.auckland.ac.nz> writes:
    Ross> Martin Maechler writes:
    >>> Actually, I've been thinking (and asking Kurt) if we shouldn't use
    >>> 'variable.names' and 'case.names' with a new logical argument that
    >>> allows to coerce a [col/row]names character vector (instead of
    >>> NULL) { Kurt suggested something along case.names(x,
    >>> construct.char.vector.if.NULL = FALSE) } instead of introducing yet
    >>> another two functions.
    >>> If you think I should do the change, I'll do it -- still before
    >>> release.
    >>> Once COLNAMES & ROWNAMES are introduced, it will be more of a pain
    >>> to deprecate them again....

    Ross> As someone who has introduced new functions (and later regretted
    Ross> it) I'd say that you sould resist the temptation to introduce
    Ross> COLNAMES and ROWNAMES if at all possible.

    Ross> Would it be possible to just change the behavior of the current
    Ross> rownames and colnames?  I don't imagine that it would break much.

    MM> Ok, I'll do this

    MM> 	colnames(x, char.return = FALSE, prefix = "col")
    MM> 	rownames(x, char.return = FALSE, prefix = "row")

Or would
	 	colnames(x, maybe.NULL = TRUE, prefix = "col")
	 	rownames(x, maybe.NULL = TRUE, prefix = "row")
even preferable?
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch