Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rstudio:subset_data [2013/04/03 16:04]
amelia
rstudio:subset_data [2016/05/13 20:45] (current)
Line 42: Line 42:
  
 The difference here is that with the first example, I was searching for all the responses that had the word "​bike"​ in them, and with ''​subset()''​ I'm picking the responses that are //not// equal to ''​none''​ because I know all the others have the word "​bike"​ in them. ''​grepl()''​ could be used for much more complex subsetting based on text, for example pulling out the word "​finally!"​ from thousands of tweets that contain tons of other text. In that case, there would not be an equivalent way to do the same thing using ''​subset()''​. ​ The difference here is that with the first example, I was searching for all the responses that had the word "​bike"​ in them, and with ''​subset()''​ I'm picking the responses that are //not// equal to ''​none''​ because I know all the others have the word "​bike"​ in them. ''​grepl()''​ could be used for much more complex subsetting based on text, for example pulling out the word "​finally!"​ from thousands of tweets that contain tons of other text. In that case, there would not be an equivalent way to do the same thing using ''​subset()''​. ​
 +
 +==== Spatial Subsetting ====
 +
 +To do spatial subsetting (i.e. choose points for a subset by selecting them on a map), see [[rstudio:​Make_maps#​spatial_subsetting|spatial subsetting]].
Print/export