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

David Brahm brahm at alum.mit.edu
Mon Mar 8 17:22:39 CET 2004


Christian Hoffmann <christian.hoffmann at wsl.ch> wrote:
> I am having difficulties documenting an infix function:
> "%&%" <- function(x,y) { paste(x,y,sep="") }

We have the exact same function, and the following documentation works fine.
Note the documentation filename is "g.am.Rd", but that's just a random name,
unrelated to the function.  Also note that "&" is escaped in the name but not
in the alias!

\name{\%\&\%}
\alias{\%&\%}
\title{Concatenate strings}
\description{a \%&\% b  converts a and b into strings and concatenates them.}
\usage{a \%&\% b}
\value{A string, the concatenation of a and b.}
\examples{3 \%&\% "RAJA"}
\keyword{character}

-- 
                              -- David Brahm (brahm at alum.mit.edu)




More information about the R-help mailing list