[R] SWeave, R and backslash

Max_Kuhn@bd.com Max_Kuhn at bd.com
Tue Apr 27 17:42:39 CEST 2004


All,

I've been using SWeave to generate output based on reports (R 1.8.1). We
developed a front end for the non-statistical users and, in this interface,
they can select one or more analyses.

There are multiple rnw files that make up the final documents for
typesetting. There is the overall rnw file that may call a number of tex
files (also produced via SWeave) using \include. Let's say that an anova
analysis is requested, then SWeave runs on anaova.rnw and an string is set
that will be used by SWeave so that it includes the file.

My first shot at this string was DoAnova <- "\include{anova}" of they want
that analysis and DoAnova <- "" if not. Of course, this didn't work since
SWeave gets the text include{anova}. So, I've tried DoAnova <-
"\\include{anova}" and DoAnova <- "\!\include{anova}" to no avail.

Does anyone have any ideas about getting the backslash?

Thanks,

Max


**********************************************************************
This message is intended only for the designated recipient(s...{{dropped}}




More information about the R-help mailing list