I'm documenting a function using roxygen2
with an @example
.
The example has a string that contains a }
symbol.
#' ...
#' @examples
#' \dontrun{
#' ## polyline joining the capital cities of Australian states
#' pl <- "nnseFmpzsZgalNytrXetrG}krKsaif@kivIccvzAvvqfClp~uBlymzA~ocQ}_}iCthxo@srst@"
#'
#' df_polyline <- decodepl(pl)
#' }
#' ...
When built, the documentation for the example is
Where everything after the first }
is cutt off.
How do I escape the }
so that it is included in the string in the example?
I've tried a backslash \{
/ \\{
with no luck.
Update - 01 Sep 2016
The official response to my issue from Hadley
Fixing this is quite difficult (as far as I can it will require writing a considerably more complicated Rd parser), and it's a rare occurrence, so realistically this is never going to get high up enough on my to do list to fix it.
}
in the string by\u007d
. Haven't tried it, but will probably work. – Casting