Description Usage Arguments Details Value Author English correction References See Also Examples
This function generates a LaTeX main document designed to include some
files built by r2lu
or r2lb
.
1 | r2lMainFile(fileOut = "main.tex",text="\\input{univ.tex}",sweave=FALSE)
|
fileOut |
|
text |
text to be included in the LaTeX document, between the '\begin{document}' and '\end{document}' macros. |
sweave |
|
r2lMainFile
generates a LaTeX master file or a Sweave file ready to include some
files built by r2lu
or r2lb
.
A LaTeX or a Sweave file ("main.tex" by default).
Christophe Genolini
christophe.genolini@free.fr
PSIGIAM: Paris Sud Innovation Group in Adolescent Mental Health
INSERM U669 / Maison de Solenn / Paris
Bernard Desgraupes
bernard.desgraupes@u-paris10.fr
University of Paris Ouest - Nanterre
Jean-Marc Chamot
jchamot@u-paris10.fr
Laboratoire "Sport & Culture" / "Sports & Culture" Laboratory
University of Paris 10 / Nanterre
LaTeX web site http://www.latex-project.org/
Data are available on line: http://christophe.genolini.free.fr/EPO/EPO2007-Fraude.php
r2lu
,
r2lb
,
r2lh-package
,
examCheating
,
Sweave
,
latex
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | # # # # # # # # # # # # # # # # # # #
# R to LaTeX, Main file generation #
# Examples #
# r2lMainFile #
# # # # # # # # # # # # # # # # #
### Creates a Sweave file
text <- "
\\maketitle
\\tableofcontents
<<>>=
data(examCheating)
@
\\section{Univariate analysis}
<<>>=
r2lu(examCheating$CheatScore,fileOut='ExamCheat-univ1.tex')
@
\\input{ExamCheat-univ1.tex}
\\section{Bivariate analysis}
<<>>=
#r2lb(examCheating$CheatScore~examCheating$Sexe,fileOut='ExamCheat-biv1.tex')
@
\\input{ExamCheat-biv1.tex}
"
if(!file.exists("tmp/sweave",recursive=TRUE)){dir.create("tmp/sweave",recursive=TRUE)}else{}
setwd("tmp/sweave")
r2lMainFile(fileOut="main.Rnw",text=text,sweave=TRUE)
Sweave("main.Rnw")
setwd("../..")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.