[R] Adding labels to variables

Martin Maechler maechler at stat.math.ethz.ch
Wed Aug 25 08:45:45 CEST 2004


References: <E7D5AB4811D20B489622AABA9C53859101F11190 at teal-exch.amgen.com>
X-Mailer: VM 7.18 under Emacs 21.3.1
Reply-To: Martin Maechler <maechler at stat.math.ethz.ch>
FCC: ~maechler/F/out
--text follows this line--
>>>>> "AustinM" == Austin, Matt <maustin at amgen.com>
>>>>>     on Tue, 24 Aug 2004 22:15:15 -0700 writes:

    AustinM> Check out the Hmisc library.

It's a *package*, not a library !

Note that there are also the  "comment" and
"comment<-"  function pair (in R's base) that you could use :

  > x <- 1:10
  > comment(x) <- "this is the price of the R stock"
  > x
   [1]  1  2  3  4  5  6  7  8  9 10
  > comment(x)
  [1] "this is the price of the R stock"

  > comment(x+4)
  [1] "this is the price of the R stock"


[these are probably among the oldest R (non-S) functions,
 maybe not known for this reason, and not really used in other
 public functions AFAIK]

Martin Maechler

    AustinM> -----Original Message-----
    AustinM> [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Neil Leonard
    AustinM> Sent: Tuesday, August 24, 2004 22:0 PM
    AustinM> To: R-help at stat.math.ethz.ch
    AustinM> Subject: [R] Adding labels to variables

    AustinM> Hi,

    AustinM> Is it possible to add labels to variables in R (so
    AustinM> as to have a better description of what the
    AustinM> variables represent)?




More information about the R-help mailing list