drm*_*mjc 19 packaging r rd roxygen2
我正在尝试使用roxygen2记录R包中的一些数据集.仅考虑其中一个:
mypkg/data/CpG.human.GRCh37.RDa
CpG.human.GRCh37
和一个名为:的文件mypkg/R/cpg-data.R
,其中包含:
#' @name CpG.human.GRCh37
#' @title CpG islands - human - genome build: GRCh37/hg19
#' @description This data set list the genomic locations of human CpG islands,
#' with coordinates based on the GRCh37 / hg19 genome build.
#' @docType data
#' @usage CpG.human.GRCh37
#' @format a \code{RangedData} instance, 1 row per CpG island.
#' @source UCSC Table Browser
#' @author Mark Cowley, 2012-03-05
#' @export
NULL
Run Code Online (Sandbox Code Playgroud)当我进行roxygenize时,会创建它mypkg/man/CpG.human.GRCh37.Rd
,包含:
\docType{data}
\name{CpG.human.GRCh37}
\alias{CpG.human.GRCh37}
\title{CpG islands - human - genome build: GRCh37/hg19}
\format{a \code{RangedData} instance, 1 row per CpG island.}
\source{
UCSC Table Browser
}
\description{
This data set list the genomic locations of human CpG
islands, with coordinates based on the GRCh37 / hg19
genome build.
}
\author{
Mark Cowley, 2012-03-05
}
\usage{CpG.human.GRCh37}
\keyword{datasets}
Run Code Online (Sandbox Code Playgroud)
并export(CpG.human.GRCh37)
添加NAMESPACE
文件.
但是当R CMD CHECK
我得到:
...
** testing if installed package can be loaded
Error in namespaceExport(ns, exports) :
undefined exports: CpG.human.GRCh37
Error: loading failed
...
Run Code Online (Sandbox Code Playgroud)
我没有告诉R在哪里可以找到这个数据集,尽管我认为这mypkg/data/<name>.RDa
是一个很好的第一个猜测.任何提示都会很棒.
如果Hadley正在观看,我注意到没有创建\ usage部分,并且忽略了@usage指令.
我在R 2.13.1上使用roxygen-2.2.2
归档时间: |
|
查看次数: |
4009 次 |
最近记录: |