According to the documentation for purrr:map(), when using a formula shortcut you can refer to "." for one function arguments (though Hadley mentions it's not recommended in Section 9.2.2 of Advanced R (https://adv-r.hadley.nz/functionals.html)). In my experience, using a ".x" in place of a "." seems to work the same, as in these two lines of code:
# Using "."
map_dbl(mtcars, ~ length(unique(.)))
# Using ".x" gives the same output as above
map_dbl(mtcars, ~ length(unique(.x)))
Can you always expect "." and ".x" to work equivalently when referring to a single argument function within map()? Or are there special situations where you would need to use "." instead of ".x"?
Thanks!