dataframe - Retrieving values in R -
i going through population dataset in googlevis library.now stroring data in data2
data2 <-data.frame(poulation)
when following
names(data2)
the following comes
[1] "rank" "country" "population"
[4] "x..of.world.population" "flag" "mode"
[7] "date
now want know names of country population greater suppose 10,000,000
i trying following getting poulation
data2$population > 10000000
now how name of countries have poulation >10000000
thanks
try this:
data2[data2$population > 10000000, ]$country
Comments
Post a Comment