Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Escaping "@" in Roxygen2 Style Documentation

Tags:

Let's say I have a comment block where I'd like to write an email address. How would I go about escaping the "@" symbol so roxygen treats it as text instead of a directive?

like image 438
Brandon Bertelsen Avatar asked Jan 10 '12 19:01

Brandon Bertelsen


1 Answers

A double at-sign @@ will do the job.

As an example, take the email address in the author field of this documentation:

##' A package to check Roxygen's sanity.
##' @name helloRoxygen-package
##' @docType package
##' @author My name \email{me@@here.org}
NA

which produces this *.Rd file when processed with roxygenize():

\docType{package}
\name{helloRoxygen-package}
\alias{helloRoxygen-package}
\title{A package to check Roxygen's sanity.}
\description{
  A package to check Roxygen's sanity.
}
\author{
  My name \email{[email protected]}
}
like image 139
Josh O'Brien Avatar answered Nov 27 '22 12:11

Josh O'Brien