I have temp list which have 19 data.frame
I want to get number of levels for pr in the first dat.frame
I do this like this:
temp[[1]]$pr just has "1A24"
after I do nlevels(temp[[1]]$pr)
I expect to get 1, but I get 19

anyone know why?

 > tail(temp[[1]]$pr)
[1] 1A24 1A24 1A24 1A24 1A24 1A24
19 Levels: 1A24 1A57 1A5J 1A6X 1AB7 1AF8 1AFI 1AGG 1AH9 1AHL 1AJ3 1AJW ... 1AZK
 > nlevels(temp[[1]]$pr)
[1] 19

Aimin

______________________________________________
[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