I have a data frame that looks as follows.

df <- data.frame(city=c("Houston", "Houston", "El Paso", "Waco", Houston",
"Plano", "Plano")

What I want to do is get a list of the city values. Currently, when I run
df$city, I get all the values.

I just want to know the four cities that appear.
So instead of:  "Houston", "Houston", "El Paso", "Waco", Houston", "Plano",
"Plano"

I want: "Houston", "El Paso", "Waco", "Plano"


I'm running R 2.13 on Ubuntu 10.10


Abraham

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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