Escaping “@” in Roxygen2 Style Documentation

蓝咒 提交于 2019-11-27 03:47:24

问题


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?


回答1:


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{me@here.org}
}


来源:https://stackoverflow.com/questions/8809004/escaping-in-roxygen2-style-documentation

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!