我有一個R包,我一直在RStudio中構建,我們稱之爲my_pkg
。當我運行中RStudio devtools::load_all(".")
(特別是使用Ctrl + Shift + L
快捷方式),我得到以下信息:字符(0)在RStudio中運行devtools :: load_all(「。」)時出現警告
Loading my_pkg
Warning messages:
1: character(0)
2: character(0)
3: character(0)
4: character(0)
5: character(0)
在包做工精細功能的全部。我的NAMESPACE
和DESCRIPTION
文件完整,沒有語法錯誤。但是,運行?my_pkg
時,幫助文件與DESCRIPTION
文件中提供的規格不符。當我從DESCRIPTION
中刪除Imports
時,不再有character(0)
警告消息。當然,我需要這些進口。當我將Imports
更改爲Suggests
時,有character(0)
警告消息。
以下是描述文件內容,其中一些內容已更改爲保護IP。
Package: scoutdroid
Title: This is where the title is.
Version: 0.1
[email protected]: "Ben Hanowell <[email protected]> [aut, cre]"
Description: This is where the description is.
Depends:
R (>= 3.1.0)
Imports:
dplyr,
lubridate,
mboost,
randomForestSRC,
RODBC,
stringr
License: file LICENSE
LazyData: true
這裏是NAMESPACE
。
# Generated by roxygen2 (4.0.1): do not edit by hand
import(RODBC)
import(dplyr)
import(lubridate)
import(mboost)
import(parallel)
import(randomForestSRC)
import(stringr)
當我使用RStudio建立在Build標籤&刷新按鈕,我得到以下警告:
**準備包延遲加載
Warning: replacing previous import by 'lubridate::intersect' when loading 'scoutdroid'
Warning: replacing previous import by 'lubridate::setdiff' when loading 'scoutdroid'
Warning: replacing previous import by 'lubridate::union' when loading 'scoutdroid'
編輯增加了一些更多細節可以幫助人們瞭解可能發生的事情。
編輯2我還添加了DESCRIPTION
文件,但我沒有提供完整的包,這是專有的。
編輯3增加NAMESPACE
。
編輯4添加了在生成選項卡中使用RStudio Build &重新加載按鈕時發生的警告。
是你在github上的軟件包 – Dason 2014-09-29 16:21:56
不是。它是專有的。 *編輯*它在Bitbucket上,但訪問是私人的。 – 2014-09-29 16:48:26
祝你好運。也許你可以嘗試做一個最小可重現的例子。 – Dason 2014-09-29 17:27:42