自从安装最新版本的 ggplot2 (0.9.1) 以来,我一直从我的旧代码中收到消息,包括:
> warnings()
Warning messages:
1: 'opts' is deprecated.
Use 'theme' instead.
See help("Deprecated")
2: 'theme_text' is deprecated.
Use 'element_text' instead.
See help("Deprecated")
8: In opts(title = trait axis.text.x = theme_text(size = fontsize$axis), ... :
Setting the plot title with opts(title="...") is deprecated. Use labs(title="...") or ggtitle("...") instead.
9: 'opts' is deprecated.
我有几个问题:
- help("Depreciated") 返回
"no documentation for 'Depreciated' in specified packages and libraries"
;这是一个错误吗? - 是否有一段时间'Depreciated' 会变成'Obsolete' 并且我的代码会开始抛出错误?
- 如何更新我的代码(以解决这些特定问题并防止其他人仍在等待被发现)?
- 我可以加载两个版本的 ggplot2 并指定我使用的每个函数的版本吗?
- 更新的语法在什么时间范围内可能会过时?
我承认这是软件的常见问题,但也许 SO 的一些贡献者对包作者的长期计划和基本原理有具体的见解。