r subset data frame with double =

new_dataframe <- subset(mydata,County=="Dublin City" | County=="South Dublin" | County=="Dún Laoghaire-Rathdown") # check new dataframe head(new_dataframe) County Population 13413 South Dublin 203 13414 South Dublin 170 13415 South Dublin 101 13416 Dún Laoghaire-Rathdown 141 13417 Dún Laoghaire-Rathdown 121 13418 Dún Laoghaire-Rathdown 223 > tail(new_dataframe) County Population 18483 Dublin City 152 18484 Dublin City 96 18485 Dublin City 150 18486 Dublin City 238 18487 Dublin City 360 18488 Dublin City 343

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.