On 09/11/17 23:40, Duncan Murdoch wrote:
On 09/11/2017 5:06 AM, Uwe Ligges wrote:
Note the % may be a comment?
Yes, and the body should be written in Rd markup, not R. Working out
the appropriate number of escapes is painful; I recommend trial and error.
This worked for me:
\newcommand{\today}{\Sexpr{format(Sys.Date(),"\\\%d/\\\%m/\\\%Y")}}
Now that is a bit more subtle! I don't understand what "written in Rd
markup" really means, and I don't understand the "\Sexpr" construction.
I'd seen it when looking at the example macros in
/usr/local/lib64/R/share/Rd/macros/system.Rd
but I figured if you know nothing about it, don't mess with it.
Is there anywhere that I could read up about writing "in Rd markup"?
Anyway, thanks for giving me the recipe, which is what I really need.
cheers,
Rolf
--
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel