I really need to sit down with the manual and sort factors and classes
properly. In your case, I think the problem has something to do with
the way a list behaves?  I'm not sure, but if you convert your list to
a dataframe it seems to work ok:

> dd3 <- as.data.frame(dd1)
> typeof(dd3$st)
[1] "integer"
> class(dd3$st)
[1] "factor"
> dd3$st <- as.character(dd3$st)
> typeof(dd3$st)
[1] "character"
> class(dd3$st)
[1] "character"

HTH,

Tyler

______________________________________________
[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
and provide commented, minimal, self-contained, reproducible code.

Reply via email to