Re: [Rd] Getting ordered factor levels from C

2012-10-24 Thread Mark Lilback
t 2:14 PM, Mark Lilback wrote: > >> I'm working on an R package in C and can't seem to get the same level >> information about a factor that the R console displays. >> >> If I define a factor as: >> >> lvls <- factor(c('red',&#x

[Rd] Getting ordered factor levels from C

2012-10-24 Thread Mark Lilback
en','red'), ordered=TRUE) When I get the "levels" attribute in C, I get back the the first vector, not the second. If I run attr(lvls,"levels") in R, I get back the second vector. There are no attributes besides class and levels, so how do I get the list o