从 usmap r 包运行代码示例时出错

问题描述 投票:0回答:1

我已将 R 更新到最新版本。清除了我的 R 环境。我尝试使用 usmap 包运行这个简单的代码,但不断收到此错误。

plot_usmap(data = statepop, values = "pop_2022")
Error in `mapply()`:
! The `legend.justification.inside` theme element is not defined in the
  element hierarchy.
Backtrace:
 1. base (local) `<fn>`(x)
 2. ggplot2:::print.ggplot(x)
 4. ggplot2:::ggplot_gtable.ggplot_built(data)
 5. ggplot2:::plot_theme(plot)
 6. base::mapply(validate_element, theme, names(theme), MoreArgs = list(element_tree = get_element_tree()))
maps rlang mapply usmap
1个回答
0
投票

我使用 usmap 但使用不同的数据集时遇到了相同的错误。您也在使用 Google Colab 吗?我在为 Colab 安装软件包时也遇到了困难,所以我想知道这是否是问题的根源。

© www.soinside.com 2019 - 2024. All rights reserved.