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

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -