[R] unusual name in .Rd file: documenting an infix function

Christian Hoffmann christian.hoffmann at wsl.ch
Fri Mar 5 16:02:23 CET 2004


Hi

I am having difficulties documenting an infix function:

paste.infix.r
"%&%" <- function(x,y) { paste(x,y,sep="") }

paste.infix.Rd
\name{pasteInfix}

  # I wanted to write \name{"\%\&\%"} or some variation of it, but &, % 
not allowed in LaTeX, see Guide.

\alias{pasteInfix}
\title{Paste(infix)}
\description{
   Paste as infix
}
\usage{
a %&% b   # or \%&\%

# this results in:
* checking Rd files ... OK
* checking for missing documentation entries ... WARNING
Undocumented code objects:
   %&%
All user-level objects in a package should have documentation entries.
See chapter 'Writing R documentation files' in manual 'Writing R
Extensions'.

* checking Rd \usage sections ... WARNING
Objects in \usage without \alias in documentation object 'pasteInfix':
   %&%
}
\arguments{
   \item{a}{character (1-dim)}
   \item{b}{character (1-dim)}
}
\value{
The concatenation of \code{a} and \code{b}, same as \code{ paste(a, b, 
sep="") }
}
\examples{
"I am" \%&\% " hungry" # [1] "I am hungry"
}
\author{Christian W. Hoffmann, \email{christian.hoffmann at wsl.ch}}
\keyword{misc}
\keyword{documentation}


Does there exist a solution to this problem?
Christian
-- 
Dr.sc.math.Christian W. Hoffmann, 
http://www.wsl.ch/staff/christian.hoffmann
Mathematics + Statistical Computing   e-mail: christian.hoffmann at wsl.ch
Swiss Federal Research Institute WSL  Tel: ++41-44-73922-   -77  (office)
CH-8903 Birmensdorf, Switzerland             -11(exchange), -15  (fax)




More information about the R-help mailing list