>>>>> "Heinz" == Heinz Tuechler <[EMAIL PROTECTED]>
>>>>>     on Tue, 23 May 2006 01:17:21 +0100 writes:

    Heinz> Dear All, after searching on CRAN I got the
    Heinz> impression that there is no standard way in R to
    Heinz> label values of a numerical variable.  

Hmm, there's  names(.)  and  "names(.) <- .."
Why are those not sufficient?

x <- 1:3
names(x) <- c("apple", "banana", NA)


    Heinz> Since this
    Heinz> would be useful for me I intend to create such an
    Heinz> attribute, at the moment for my personal use.  Still
    Heinz> I would like to choose a name which does not conflict
    Heinz> with names of commonly used attributes.

    Heinz> Would value.labels or vallabs create conflicts?

    Heinz> The attribute should be structured as data.frame with
    Heinz> two columns, levels (numeric) and labels
    Heinz> (character). These could then also be used to
    Heinz> transform from numeric to factor. If the attribute is
    Heinz> copied to the factor variable it could also serve to
    Heinz> retransform the factor to the original numerical
    Heinz> variable.

    Heinz> Comments? Ideas?

    Heinz> Thanks

    Heinz> Heinz Tüchler

    Heinz> ______________________________________________
    Heinz> [email protected] mailing list
    Heinz> https://stat.ethz.ch/mailman/listinfo/r-help PLEASE
    Heinz> do read the posting guide!
    Heinz> http://www.R-project.org/posting-guide.html

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to