不再支持ggplot2中的箭头() [英] arrow() in ggplot2 no longer supported

查看:125
本文介绍了不再支持ggplot2中的箭头()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在新机器和ggplot2上安装R 2.15.2。这个最新版本的R不再支持grid包,但ggplot2使用grid作为 arrow()函数,就像这些例子一样。



http://docs.ggplot2.org/current/geom_segment.html



无法找到解决方法。任何建议?

解决方案

也许你认为 grid 不再受支持因为在其CRAN页面上显示的消息?但是,如果写成 Package'grid'已从CRAN存储库中移除,那是因为它现在是基本R分布的一部分,正如 Paul Murrell的网格页面



所以 library(grid) arrow 函数应该可以正常工作。



一些混淆可能是由于 grid ggplot (使 grid 函数对用户可见/可访问);现在它通过NAMESPACE导入来引用,所以如果你想使用 grid 函数,你需要显式地加载 grid 或查看他们的帮助页面)。


Installed R 2.15.2 on a new machine and ggplot2. The grid package is no longer supported in this latest version of R, but ggplot2 uses grid for the arrow() function, as in these examples.

http://docs.ggplot2.org/current/geom_segment.html

Haven't been able to find a workaround. Any suggestions?

解决方案

Maybe you think that grid is no more supported because of the message displayed on its CRAN page ? But if it is written that Package ‘grid’ was removed from the CRAN repository, it is because it is now part of the base R distribution, as mentioned on Paul Murrell's grid page.

So library(grid) and the arrow function should work fine.

Some of the confusion may be due to the fact that grid was loaded automatically by previous versions of ggplot (making grid functions visible/accessible to the user); now it's referred to via NAMESPACE imports instead, so you need to explicitly load grid if you want to use grid functions (or look at their help pages).

这篇关于不再支持ggplot2中的箭头()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆