Bug 15024 - setRownames, setColnames and setDimnames functions
Summary: setRownames, setColnames and setDimnames functions
Status: NEW
Alias: None
Product: R
Classification: Unclassified
Component: Wishlist (show other bugs)
Version: R 2.15.1 patched
Hardware: All All
: P5 enhancement
Assignee: R-core
Depends on:
Reported: 2012-08-21 19:09 UTC by Henric Winell
Modified: 2012-08-21 19:09 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Henric Winell 2012-08-21 19:09:15 UTC
Package 'stats' has the simple but useful convenience function 'setNames'.  How about adding similar functions for setting 'rownames', 'colnames' and 'dimnames'?  Following 'setNames', this would just amount to providing

setRownames <- function (object, nm) {
    rownames(object) <- nm

setColnames <- function (object, nm) {
    colnames(object) <- nm

setDimnames <- function (object, nm) {
    dimnames(object) <- nm

This seems really trivial, and I may of course be overlooking something, but I hope you will consider this suggestion.  Thanks!