@
是R文档中的特殊字符,那么如何在文档中使用文字@
?
我尝试使用单,双,三和四反斜杠。但是没有运气。
#' @importFrom utils file.edit
#'
#' @export
#'
#' @examples
#' library(dplyr)
#' medium("https://medium.com/@data_datum/ggplot2-or-how-to-make-fancy-graphics-with-r-fabae7fc16d4")
#'
在上面的示例中,URL中的@
将导致语法错误
将@
符号加倍。即将@
替换为@@
即更改
#' medium("https://medium.com/@data_datum/ggplot2-or-how-to-make-fancy-graphics-with-r-fabae7fc16d4")
to
#' medium("https://medium.com/@@data_datum/ggplot2-or-how-to-make-fancy-graphics-with-r-fabae7fc16d4")
请参见另一个示例here