我正在学习使用 RStudio 构建自己的包。.tar.gz
包(名为SteenSubsSpec
)的当前版本在此处。目前,该Build & Reload
命令似乎可以成功构建和 Roxygen-ize 包。然而,这些函数似乎没有加载到内存中,尽管事实上Build & Reload
成功更新了文档。我究竟做错了什么?
Build & Reload
给出以下输出:
==> roxygenize('.', roclets=c('rd'))
- 检查更改...完成
==> R CMD 构建 SteenSubsSpec
* checking for file ‘SteenSubsSpec/DESCRIPTION’ ... OK
* preparing ‘SteenSubsSpec’:
* checking DESCRIPTION meta-information ... OK
* excluding invalid files
Subdirectory 'R' contains invalid file names:
‘2013_08_30_report-concordance.tex’ ‘2013_08_30_report.Rnw’
‘2013_08_30_report.log’ ‘2013_08_30_report.pdf’
‘2013_08_30_report.synctex.gz’ ‘2013_08_30_report.tex’
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
Removed empty directory ‘SteenSubsSpec/inst’
* building ‘SteenSubsSpec_1.0.tar.gz’
Source package written to ~/Dropbox/[my directory]
这会更新文档:?write_paper()
按预期显示当前文档。然而
require(SteenSubsSpec)
write_paper()
给Error: could not find function "write_paper"
有些事情似乎是正确的:
- 所有函数文件都在
R
目录中,并且与它们的定义同名(例如/R/write_paper.R
定义write_paper() <- function {...
- 该
DESCRIPTION
文件包含所有相关函数文件的名称:Collate: ... 'write_paper.R
我该如何解决这个问题?