[R] row names, coulmn names

Greg Snow 538280 at gmail.com
Tue May 3 23:26:40 CEST 2016


There are some packages that add labels or other attributes (units) to
columns of data frames and have methods to display the labels, units,
etc.  One of these packages is Hmisc, see the label and unit
functions.  I believe that there are other packages as well.  This may
provide what the original poster desires.

On Sun, May 1, 2016 at 1:55 PM, David Winsemius <dwinsemius at comcast.net> wrote:
>
>> On May 1, 2016, at 11:09 AM, Jan Kacaba <jan.kacaba at gmail.com> wrote:
>>
>> Hello dear R helpers,
>>
>> Is it possible to have more than 1 row for column names in data.frame,
>> array, tbl_df? I would like to have column numbers in the first row, string
>> names in the second row, physical unit in third row.
>
> It's possible to embed "\n" in names but whether that will deliver desired results with plotting and printing functions may be another matter. You would always  need to quote names, even when using "$".
>
>
>> How would I do it?
>>
>> Derek
>>
>>       [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
> David Winsemius
> Alameda, CA, USA
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



-- 
Gregory (Greg) L. Snow Ph.D.
538280 at gmail.com



More information about the R-help mailing list