/ / W tym dokument Sweave w studio R? - r, sweave, rstudio

W tym dokument Sweave w studio R? - r, sweave, rstudio

Stworzyłem dwa pliki Master.Rnw i Child.Rnw jak w ta dokumentacja. Do:

Master.rnw:

documentclass{article}
begin{document}
SweaveOpts{concordance=TRUE}

section{Overview}
This is the overview.

SweaveInput{Child.Rnw}

end{document}

Child.Rnw:

% !Rnw root = Master.Rnw

section{Analysis}
This is the analysis.

<<analysis>>=
summary(cars)
@

Klikam "Kompiluj PDF" i otrzymuję "Niezdefiniowaną sekwencję kontrolną" dla SweaveOpts i SweaveInput.

Używam najnowszego programu R Studio (0.98.490).

Propozycje?

Odpowiedzi:

2 dla odpowiedzi № 1

Projekt został ustawiony na splatanie za pomocą knitr zamiast Sweave.

Poszedłem do Tools / Options / Sweave / "Weave Rnw files using" i zmieniłem go na Sweave.

Dzięki temu udokumentowany przykład zadziałał.