主题错误(legend.position = “top”):找不到函数“主题”

Error in theme(legend.position = "top") : could not find function "theme"

提问人:lxrnax 提问时间:10/7/2023 最后编辑:Phillxrnax 更新时间:10/8/2023 访问量:33

问:

安装 ggplot2 后,我遇到了无法安装其他软件包或我实际上已经拥有的软件包的问题。

警告消息是:

Error: Loading package or namespace for 'broom' in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): failed
  Namespace ‘rlang’ 1.0.6 is already loaded, but >= 1.1.0 is required
In addition: Warning message:
Package ‘broom’ was created under R version 4.2.3

我该如何解决这个问题?

我已经尝试更新所有软件包。

r install.packages

评论

0赞 Phil 10/8/2023
您使用的是哪个版本的 R?
2赞 r2evans 10/8/2023
(1)原文与ggplot2无关,你的标题是一条红鲱鱼。(2)错误是需要关注的。完全重启 R(所有正在运行的 R 实例),然后重新安装 ,然后重新安装最初尝试安装的包。rlangrlang
0赞 lxrnax 10/10/2023
现在它起作用了,谢谢!

答: 暂无答案