On Sat, 3 Feb 2018, Allin Cottrell wrote:
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.
Might as well strike while the iron is hot: that's now in git.
Why not go all the way, then? How about {c|r}name{get|set}?
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------