
Pessoal tenho tentado usar o Sweave, mas não dá certo onde estou errando, o arquivo que estou tentando rodar é este utilizando o TexnicCenter e R 2.13.1 \documentclass[a4paper]{article} \title{Sweave Example 1} \author{Friedrich Leisch} \begin{document} \maketitle In this example we embed parts of the examples from the \texttt{kruskal.test} help page into a \LaTeX{} document: <<>>= data(airquality) library(stats) kruskal.test(Ozone ~ Month, data = airquality) @ which shows that the location parameter of the Ozone distribution varies significantly from month to month. Finally we include a boxplot of the data: \begin{center} <<fig=TRUE,echo=FALSE>>= boxplot(Ozone ~ Month, data = airquality) @ \end{center} \end{document} e resulta neste anexo

Caro, Como você está gerando o seu arquivo .tex? Não sei se é do seu conhecimento mas o Sweave funciona da seguinte forma: Primeiro você escreve todo o seu documento em um arquivo de extensão .Rnw, abre no R e executa com o comando do Sweave (não me recordo no momento). Feito isso, adicionalmente o Sweave criará um arquivo de extensão .tex. Este é o procedimento? Neste link segue um arquivo .Rnw utilizado pelo Prof. Wagner H. Bonat em suas aulas http://www.leg.ufpr.br/lib/exe/fetch.php/disciplinas:instrucao.rnw e o arquivo resultado seguindo os passos supracitados http://www.leg.ufpr.br/lib/exe/fetch.php/disciplinas:instrucao.pdf . Escrevi essas linhas acima pois foi essa dificuldade que me deparei ao começar a batalha com o Sweave, primeiramente no windowns. Daniel Date: Mon, 15 Aug 2011 00:51:11 -0300 From: jorgeas@ufcg.edu.br To: r-br@listas.c3sl.ufpr.br Subject: [R-br] Sweave Pessoal tenho tentado usar o Sweave, mas não dá certo onde estou errando, o arquivo que estou tentando rodar é este utilizando o TexnicCenter e R 2.13.1 \documentclass[a4paper]{article} \title{Sweave Example 1}\author{Friedrich Leisch} \begin{document} \maketitle In this example we embed parts of the examples from the\texttt{kruskal.test} help page into a \LaTeX{} document: <<>>=data(airquality)library(stats)kruskal.test(Ozone ~ Month, data = airquality)@which shows that the location parameter of the Ozone distribution varies significantly from month to month. Finally weinclude a boxplot of the data: \begin{center}<<fig=TRUE,echo=FALSE>>=boxplot(Ozone ~ Month, data = airquality)@\end{center} \end{document} e resulta neste anexo _______________________________________________ R-br mailing list R-br@listas.c3sl.ufpr.br https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forne�a c�digo m�nimo reproduz�vel.

Como um adicional: Quando pedir para o R ler o arquivo .Rnw, tudo que estiver fora dos chunks (<<>>= .......@ ) não será executado pelo R, deixando essa função única e exclusivamente para o LaTeX. Daniel Date: Mon, 15 Aug 2011 00:51:11 -0300 From: jorgeas@ufcg.edu.br To: r-br@listas.c3sl.ufpr.br Subject: [R-br] Sweave Pessoal tenho tentado usar o Sweave, mas não dá certo onde estou errando, o arquivo que estou tentando rodar é este utilizando o TexnicCenter e R 2.13.1 \documentclass[a4paper]{article} \title{Sweave Example 1}\author{Friedrich Leisch} \begin{document} \maketitle In this example we embed parts of the examples from the\texttt{kruskal.test} help page into a \LaTeX{} document: <<>>=data(airquality)library(stats)kruskal.test(Ozone ~ Month, data = airquality)@which shows that the location parameter of the Ozone distribution varies significantly from month to month. Finally weinclude a boxplot of the data: \begin{center}<<fig=TRUE,echo=FALSE>>=boxplot(Ozone ~ Month, data = airquality)@\end{center} \end{document} e resulta neste anexo _______________________________________________ R-br mailing list R-br@listas.c3sl.ufpr.br https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forne�a c�digo m�nimo reproduz�vel.
participantes (2)
-
Daniel Dantas
-
jorgeas@ufcg.edu.br