Line Breaks for LaTeX Code in R Documentation Files

1 · Yihui Xie · Dec. 31, 2007, midnight
Summary
I suddenly realized just now that the line breaks for LaTeX code in Rd files are also \cr instead of \\ (which I thought to be in the past). R CMD check will replace your \cr with \\ when producing LaTeX documentation files. If you write \\ directly in Rd files, it will be recognized as “an escape character + a backslash”, which surely is not a line break symbol. I found such a problem in the documentation file for the function brownian.motion() in my package animation. The original code is: \de...