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:
knitr::include_graphics("images/selection.jpg")
Using the tools via these buttons \@ref(fig:selection) have two effects.
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
object^[or, if you are familiar with pipes, piped into a new operation].
Interactive selection (button "Select" in \@ref(fig:selection) is a priori not reproducible and therefore not supported in R
.
{block2, type = "rmdnote"}
By the way: In the world of SQL this type of operation is not called "selection" but "filtering". Consequently, that is also the name used in `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).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.