[datatable-help] Variable labels suggestion

Chris Neff caneff at gmail.com
Thu Jul 28 19:51:48 CEST 2011


I think this is definitely out of the scope of data.table.

On 28 July 2011 13:43, Tom Short <tshort.rlists at gmail.com> wrote:

> On Thu, Jul 28, 2011 at 8:26 AM, Griffith Rees
> <griffith.rees at sociology.ox.ac.uk> wrote:
> > I think this page quite succinctly describes this issue:
> > http://www.statmethods.net/input/variablelables.html
>
> It would be easy to add to data.table. You could also add support
> outside of data.table by writing label.data.table and similar
> functions. Actually using the labels for useful things is more
> difficult. I often find it useful just to use more verbose variable
> names that include spaces as follows:
>
> > dt <- data.table(`My first column` = 1:3, `A character column` =
> letters[1:3], check.names = FALSE)
> > str(dt)
> Classes 'data.table' and 'data.frame':  3 obs. of  2 variables:
>  $ My first column   : int  1 2 3
>  $ A character column: Factor w/ 3 levels "a","b","c": 1 2 3
>
> That way, columns look better with automatic plotting and with lattice
> or ggplot legends.
>
> - Tom
> _______________________________________________
> datatable-help mailing list
> datatable-help at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20110728/75327f15/attachment.htm>


More information about the datatable-help mailing list