I wrote a method for a generic S4 function in R. The name of the generic function is extract
. The class the method refers to has a hyphen in it, as in Zelig-tobit
models. I'd like to write a documentation entry for the method as follows in the usage section of the respective .Rd file:
\S4method{extract}{Zelig-tobit}(model, ...)
If I do that, R CMD check --as-cran
returns an error message:
* checking Rd \usage sections ... WARNING
Bad \usage lines found in documentation object 'extract':
<unescaped bksl>S4method{extract}{Zelig-tobit}(model, ...)
How do I correctly escape the hyphen?