From murdoch at stats.uwo.ca  Mon Nov  9 14:12:12 2009
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Mon, 09 Nov 2009 08:12:12 -0500
Subject: [Rd] \\signature macro generated by promptMethods
In-Reply-To: <4AF80D8B.1060205@dbmail.com>
References: <4AF80D8B.1060205@dbmail.com>
Message-ID: <4AF8152C.80700@stats.uwo.ca>

On 09/11/2009 7:39 AM, Romain Francois wrote:
> Hello,
> 
> promptMethods generate a macro for signatures, but the macro does not 
> exist in the Rd parser.

Right, that's not supposed to be a macro.  See ?cbind2 for an example,

\item{\code{signature(x = "ANY", y = "ANY")}}{the default method
       using \R's internal code.}

Duncan Murdoch


> 
>  > setClass("track",
> +          representation(x="numeric", y="numeric"))
> [1] "track"
>  > setGeneric("foo", function(x){ standardGeneric("foo") } )
> [1] "foo"
>  > setMethod( "foo", "track", function(x){ NULL } )
> [1] "foo"
>  > promptMethods( "foo" )
> A shell of methods documentation has been written to the file
> ?foo-methods.Rd?.
>  > writeLines( readLines( "foo-methods.Rd" ) )
> \name{foo-methods}
> \docType{methods}
> \alias{foo-methods}
> \alias{foo,track-method}
> \title{ ~~ Methods for Function foo  ~~}
> \description{
>   ~~ Methods for function \code{foo}  ~~
> }
> \section{Methods}{
> \describe{
> \item{\code{\signature(x = "track")}}{ ~~describe this method here }
> }}
> \keyword{methods}
> \keyword{ ~~ other possible keyword(s)}
> 
> Romain
>



[Rd] \\signature macro generated by promptMethods
Duncan Murdoch