I often find myself getting into a situation like this when using the tidyverse and plotting geo-data:
library(purrr) library(ggplot2) map(1:2, identity) #> [] #>  1 #> #> [] #>  2 map_data("world") %>% dplyr::filter(region == "Greenland") %>% ggplot(aes(x = long, y = lat)) + geom_polygon(aes(group = group)) #> Attaching package: 'maps' #> The following object is masked from 'package:purrr': #> #> map map(1:2, identity) #> Error in paste("(^", regions, ")", sep = "", collapse = "|"): cannot coerce type 'closure' to vector of type 'character'
It's not a massive deal, since I can just call
purrr::map explicitly, although it is a bit annoying and can often interrupt my workflow.
Is there any way to call
ggplot2::map_data without attaching
maps::map into the current environment*?
* Also, have I got the terminology correct, here?