I often find myself making incorrect choices in variables names when using purrr
.
For example, take the code on the github page of purrr.
library(purrr)
mtcars %>%
split(.$cyl)
in split(.$cyl)
I often make the mistake of using split(cyl)
. This seems to be the most obvious choice as it is consistent with other tidyverse
commands such as select(cyl)
.
My question is why the .$
in front of the variable name.