2

Possible Duplicate:
Roxygen: How to properly document a S3 method of a generic in a different package?

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)
}

It works well but produce an error while check:

* checking Rd \usage sections ... NOTE
S3 methods shown with full name in documentation object 'as.mcmc.mcmcComposite':
  ‘as.mcmc.mcmcComposite’

The \usage entries for S3 methods should use the \method markup and not
their full name.
See the chapter ‘Writing R documentation files’ in the ‘Writing R
Extensions’ manual.

I don't understand how to correct such error. Thanks for any advice

Marc Girondot

Community
  • 1
  • 1
MarcG
  • 103
  • 7
  • 2
    I think you are missing an `@` in the second to last line, and you used. It should be `#' @method as.mcmc mcmcComposite` – Andrie Nov 23 '12 at 13:25
  • See also http://stackoverflow.com/questions/7198758/roxygen2-how-to-properly-document-s3-methods and http://stackoverflow.com/questions/6517222/roxygen-how-to-properly-document-a-s3-method-of-a-generic-in-a-different-packag – Joris Meys Nov 23 '12 at 13:27
  • 3
    And on a sidenote: that's not an error. That's a note. – Joris Meys Nov 23 '12 at 13:28

0 Answers0