0

Possible Duplicate:
R-oxygen documentation of S3 method produces error while check

My question R-oxygen documentation of S3 method produces error while check has been closed as being "exact duplicate" of other... Nice. But I checked of course these questions before post mine and I don't find the answer ! As for people here, be sure before to close a topic !

When I do not use the tag @method, I get an warning during the check (previous post).

If I use the @method, I get an error during the check (see below).

* 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

I try to create a method as.mcmc.mcmcComposite based on as.mcmc defined in package coda. Here is the code:

#' 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)
}
Community
  • 1
  • 1
MarcG
  • 103
  • 7
  • This doesn't sound like it has anything to do with `roxygen`, but possibly some undeclared dependencies. In which package is `as.mcmc`? Have you declared this as an `import` or `depends`? – Andrie Nov 23 '12 at 15:12
  • Thanks Andrie, it was the solution: #' import coda And it works ! – MarcG Nov 23 '12 at 15:27
  • I'm glad that helped. Please, next time you suggest we closed your question too early, be sure to think about whether you asked the right question. :-) – Andrie Nov 23 '12 at 15:43

0 Answers0