在我的描述文件中,我改变了
Imports: dplyr (>= 0.4.3), ggplot2 (>= 2.1.0), lazyeval (>= 0.1.10)
Run Code Online (Sandbox Code Playgroud)
至
Depends: dplyr (>= 0.4.3), ggplot2 (>= 2.1.0), lazyeval (>= 0.1.10)
Run Code Online (Sandbox Code Playgroud)
这对我有用."进口:"可能会贬值?
---
我在RStudio写一个包.我的一个依赖是dplyr.当我构建并重新加载包时,运行函数时出现以下错误:
> library(my_package)
> my_package::get_survey(...)
Error in get_survey(import_dir) : could not find function "%>%"
Run Code Online (Sandbox Code Playgroud)
但是,我在描述文件中记录了我的依赖项:
Imports: dplyr (>= 0.4.3), ggplot2 (>= 2.1.0), lazyeval (>= 0.1.10)
Run Code Online (Sandbox Code Playgroud)
这些库安装在我的系统上,但是我希望我的包能够开箱即用而无需用户运行
library(dplyr)
library(ggplot2)
library(lazyeval)
Run Code Online (Sandbox Code Playgroud)
在使用它之前.我怎样才能解决这个问题?
这是我的sessionInfo():
R version 3.3.0 (2016-05-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252 …Run Code Online (Sandbox Code Playgroud)