0

我有一个包 ( qdap ) 和一个随附的仅数据包 ( qdapDictionaries ),它们将被 qdap 中的某些函数使用,如第 41 行所示。我这里使用第 454 行的 syn.env 。

我已经在 R-help 列表上询问了一个相关问题,但被告知它不适合该列表,因为它使用 roxygen2 的私有符号,但是,我实际上可以从qdapDictionaries. 我尝试简单地添加@export到描述数据集的 .R 文件中,但这会在编译时导致错误。

> set(qdapDictionaries)
Installing qdapDictionaries
"C:/R/R-3.0.1/bin/i386/R" --vanilla CMD INSTALL  \
  "C:\Users\trinker\GitHub\qdapDictionaries" --library="C:/R/R-3.0.1/library"  \
  --with-keep.source --install-tests 

* installing *source* package 'qdapDictionaries' ...
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
Error in namespaceExport(ns, exports) : 
  undefined exports: abbreviations, action.verbs, adverb, amplification.words, BuckleySaltonSWL, contractions, deamplification.words, DICTIONARY, emoticon, env.pol, env.syl, env.syn, interjections, labMT, NAMES, NAMES_LIST, NAMES_SEX, negation.words, negative.words, OnixTxtRetToolkitSWL1, positive.words, preposition, SYNONYM, Top100Words, Top200Words, Top25Words
Error: loading failed
Execution halted
*** arch - x64
Error in namespaceExport(ns, exports) : 
  undefined exports: abbreviations, action.verbs, adverb, amplification.words, BuckleySaltonSWL, contractions, deamplification.words, DICTIONARY, emoticon, env.pol, env.syl, env.syn, interjections, labMT, NAMES, NAMES_LIST, NAMES_SEX, negation.words, negative.words, OnixTxtRetToolkitSWL1, positive.words, preposition, SYNONYM, Top100Words, Top200Words, Top25Words
Error: loading failed
Execution halted
ERROR: loading failed for 'i386', 'x64'
* removing 'C:/R/R-3.0.1/library/qdapDictionaries'
* restoring previous 'C:/R/R-3.0.1/library/qdapDictionaries'
Error: Command failed (1)

显然我没有正确导出这些数据集。 如何从中导出数据集qdapDictionaries以便可以@importFrom在父qdap包中使用?

以下是数据集的文档之一:

#' Fry's  100 Most Commonly Used English Words
#' 
#' A stopword list containing a character vector of stopwords. 
#' 
#' @details Fry's Word List: The first 25 make up about one-third of all printed 
#' material in English. The first 100 make up about one-half of all printed 
#' material in English. The first 300 make up about 65\% of all printed 
#' material in English."
#' 
#' 
#' @docType data 
#' @keywords datasets 
#' @name Top100Words 
#' @usage data(Top100Words) 
#' @format A character vector with 100 elements 
#' @export
#' @references Fry, E. B. (1997). Fry 1000 instant words. Lincolnwood, IL: 
#' Contemporary Books.
NULL

请注意,我qdapDictionaries在说明文件的 Depends 部分中列出了这些内容,但对于 R 开发版本,CRAN 检查显示我仍需要从中导入qdapDictionariesqdap包中使用的数据集。

4

0 回答 0