Re: [R] how to get paste() to output \% so LaTeX will interpret it as a percent sign rather than a comment symbol

2023-09-08 Thread Hadley Wickham
You're getting confused between the contents of the string and the printed representation of the string. There's a little bit about this in R4DS: https://r4ds.hadley.nz/strings#escapes (or in brief, do writeLines(trailing.7.message)) Hadley On Fri, Sep 8, 2023 at 7:23 AM Christopher Ryan via

[R] how to get paste() to output \% so LaTeX will interpret it as a percent sign rather than a comment symbol

2023-09-08 Thread Christopher Ryan via R-help
I'm using a .Rnw --> Sweave --> pdflatex workflow on Windows 10, with emacs 26.3 and ESS (not sure which version.) I have this code: n.tests.7 <- 3 ## for example trailing.7.pos.percent <- 12 ## for example trailing.7.message <- ifelse( n.tests.7 > 0, paste("In the past seven