[R] Take a levels
Muhammad Subianto
subianto at gmail.com
Wed Apr 27 14:21:34 CEST 2005
Dear all,
How can I take a levels from a dataset.
For example,
data(iris)
x.iris <- iris[,1:4]
y.iris <- iris[,5]
> y.iris
[1] setosa setosa setosa setosa setosa setosa
[7] setosa setosa setosa setosa setosa setosa
....
[139] virginica virginica virginica virginica virginica virginica
[145] virginica virginica virginica virginica virginica virginica
Levels: setosa versicolor virginica
I want like,
y.iris level are,
[] setosa versicolor virginica
Best regards,
Muhammad Subianto
More information about the R-help
mailing list