recovering names of factor levels ??

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

recovering names of factor levels ??

maddox
Hi,

I have a factor with 3 levels. I'd like to recover the names of each level so I can use them to search through another data structure. Is this possible?

Thanks

M
Reply | Threaded
Open this post in threaded view
|

Re: recovering names of factor levels ??

plangfelder
see function levels()

?levels

Peter

On Wed, Dec 22, 2010 at 3:00 PM, maddox <[hidden email]> wrote:
>
> Hi,
>
> I have a factor with 3 levels. I'd like to recover the names of each level
> so I can use them to search through another data structure. Is this
> possible?
>
> Thanks
>

______________________________________________
[hidden email] mailing list
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.
Reply | Threaded
Open this post in threaded view
|

Re: recovering names of factor levels ??

maddox
Thanks Peter, for your succinctly helpful reply

The way R works is still a learning experience for me. I hope I'll be asking fewer of these type of questions as I get to grips with R. In the meantime, thanks for the help (and patience)

regards

M