On Sat, 3 Feb 2018, Sven Schreiber wrote:
Am 03.02.2018 um 03:33 schrieb Allin Cottrell:
> On Sat, 3 Feb 2018, oleg_komashko(a)ukr.net wrote:
>> Is there a less roundabout way to extract row names
>> of a matrix
>
> OK, alright! By popular demand, there's now a rowname() function in git.
Thanks!
I've just reviewed the situation with colnames/colname/rownames, however, and
I must say I find it not really obvious that colname --and now also rowname--
*gets* the names, while colnames/rownames *puts* names. The labeling seems
confusing to me.
Could we perhaps rename the new rowname to something like rnameget (or
similar), and perhaps introduce a similar alias like cnameget for colname?
And a further possible extension: Similar to strsplit(), the functions
colname and rowname (or their new aliases) might also return an array of
strings of *all* names in the case that the second index argument is omitted.
(With some room for discussion on what to do in case of a vector.)
I agree, these changes would be desirable.
Allin