5 Selection
A very commonly used tool in ArcGIS is the concept of “Selection.” The idea is, that you select features from your vector dataset in one of the following three ways:
- Select: Interactively by clicking in your map
- Select By Attributes: By specifying (non-spatial) criteria based on the attribute table
- Select By Location: By specifying spatial criteria based on the relationship to another dataset.
Using the tools via these buttons 5.1 have two effects.
- The selected features are highlighted visually
- Any operation performed with a dataset that has an active selection respects this selection. In other words, the operation is only performed on the selected features.
This second effect is cause for many confusing errors, either because the user forgot that a selection was active or the there were zero elements matching the specified criteria and so the operation was performed on an empty dataset.
For this reason, this type of “floating selection” is not very useful and was never implemented in R
.
However, two of the three described methods to select data are supported in R
, but with a different approach. The selected data leaves the original data unchanged, but must assigned to a new R
object3.
Interactive selection (button “Select” in 5.1 is a priori not reproducible and therefore not supported in R
.
R
. In R
as well as SQL
, a select is done on columns in a dataset, not on rows (i.e. if you want to retain only a subset of the columns in a dataset).
or, if you are familiar with pipes, piped into a new operation↩︎