【发布时间】:2019-09-29 16:46:51
【问题描述】:
见下文 - 我不明白这种行为。我可以通过region 成功过滤,但不能通过subregion 过滤。无论是否强化对象WorldData1,都会发生这种情况。它也像这样保存到文件中。有任何想法吗?
library(tidyverse)
WorldData1 <- map_data('world') %>% filter(subregion != '')
# I am using no characters as filter, but this also happens when putting in a subregion, e.g. 'Alaska'
#>
#> Attaching package: 'maps'
#> The following object is masked from 'package:purrr':
#>
#> map
ggplot() +
geom_map(data = WorldData1, map = WorldData1,
aes(x = long, y = lat, map_id = region))
#> Warning: Ignoring unknown aesthetics: x, y
由reprex package (v0.2.1) 于 2019 年 5 月 12 日创建
devtools::session_info()
#> ─ Session info ──────────────────────────────────────────────────────────
#> setting value
#> version R version 3.5.3 (2019-03-11)
#> os macOS Mojave 10.14.3
#> system x86_64, darwin15.6.0
#> ui X11
#> tidyverse * 1.2.1 2017-11-14 [1] CRAN (R 3.5.0)
【问题讨论】: