Roxygen文档

时间:2012-11-23 15:03:30

标签: r roxygen

  

可能重复:
  R-oxygen documentation of S3 method produces error while check

我的问题R-oxygen documentation of S3 method produces error while check已被关闭,因为其他人的“完全重复”......很好。但是我在发布之前检查过这些问题,我找不到答案! 至于这里的人,请务必关闭一个话题!

当我不使用标签@method时,我会在检查期间收到警告(上一篇文章)。

如果我使用@method,我会在检查过程中收到错误(见下文)。

* checking whether package ‘embryogrowth’ can be installed ... ERROR
Installation failed.
See ‘/Users/marcgirondot/Documents/Espace de travail
R/EGR/embryogrowth/embryogrowth.Rcheck/00install.out’ for details.


> system("cat '/Users/marcgirondot/Documents/Espace de travail 
 R/EGR/embryogrowth/embryogrowth.Rcheck/00install.out'")

* installing *source* package ‘embryogrowth’ ...
** R
** data
**  moving datasets to lazyload DB
Error : object 'as.mcmc' not found whilst loading namespace 'embryogrowth'
ERROR: lazydata failed for package ‘embryogrowth’
* removing ‘/Users/marcgirondot/Documents/Espace de travail
R/EGR/embryogrowth/embryogrowth.Rcheck/embryogrowth’

Marc Girondot

我尝试根据包coda中定义的as.mcmc创建一个方法as.mcmc.mcmcComposite。这是代码:

#' as.mcmc Extract mcmc object from a result to be used with coda package
#' @title Extract mcmc object from a result to be used with coda package
#' @author Marc Girondot
#' @return A mcmc.list object
#' @param x A result object
#' @description Take a mcmcComposite object and create a mcmc.list object
#' @examples
#' # Try
#' @method as.mcmc mcmcComposite
#' @export


as.mcmc.mcmcComposite <-
function(x) {
    return(x$resultMCMC)
}

0 个答案:

没有答案