How to config Tinn-R for Sweave?

Help
albo
2012-02-28
2012-09-25
  • albo

    albo - 2012-02-28

    Hi Folks,

    New Sweave user. Installed MikTex. Can generate tex files with tinn-r, but how
    do i get tinn-r to go all the way to producing pdf's automatically? I see the
    tools->processing->compilation menu, but the options are greyed out. Any help
    greatly appreciated! Strangely, I wasn't able to find this info online
    anywhere.

    thanks!

    alex

     
  • jcfaria

    jcfaria - 2012-02-29

    Alex,

    Some menu options of Tinn-R are dependents of the file extension and Latex is
    one of this.

    If you have myfile.rnw Sweave will generate myfile.tex and the file myfile.tex
    is not opened automatically for Tinn-R. So, it is necessary to open
    myfile.tex. After the menu options for compilation (DVI or PDF) will be
    activated.

    Please, see also in Tinn-R: Options/Processing/PDF and Options/Processing/PDF
    and give a looked also at Help/Main/User guide/html

    HTH,
    JCFaria

     
  • albo

    albo - 2012-02-29

    thanks JCFaria. That makes sense. Now, when I'm trying to process the .tex to
    .pdf, a command window comes up and seems stuck. When I ctrl+C out of it, I
    get a dialog box saying that I haven't specified the path of the "interpreter,
    conversor or viewer". I think it's that I haven't defined the path of the
    viewer. What is the "viewer"? Should that be the miktex executable, or perhaps
    acrobat? And, any idea how to make the conversion happen successfully, instead
    of getting stuck with a command window?

    thanks again.!

     
  • albo

    albo - 2012-02-29

    ok, i think i've figured out that the viewer should be acrobat (or another pdf
    reader). But I'm still getting all sorts of errors in this command window. Any
    help would be greatly appreciated!

    Here's the file I'm inputting (taken from an example online):

    \ documentclass{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 :
    \begin{Schunk}
    \begin{Sinput}

    data(airquality)
    kruskal.test(Ozone ~ Month, data = airquality)
    \end{Sinput}
    \begin{Soutput}
    Kruskal-Wallis rank sum test

    data: Ozone by Month
    Kruskal-Wallis chi-squared = 29.2666, df = 4, p-value = 6.901e-06
    \end{Soutput}
    \end{Schunk}
    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}
    \includegraphics{sweave_test-002}
    \end{center}
    \end{document}

    and here's all the nasty output from the command window (note that I've
    altered the path here - the real path contains a space):

    This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9)
    entering extended mode

    ("C:\Users\username\Documents\sweave_test.tex"
    LaTeX2e <2011/06/27>
    Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek,
    ar
    abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
    croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french,
    ga
    lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian,
    iceland
    ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin,
    lat
    vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek,
    ngerm
    an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese,
    romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish,
    swis
    sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian,
    u
    senglishmax, welsh, loaded.

    C:\Users\username\Documents\sweave_test.tex:1: LaTeX Error: Missing
    \begin{document}.

    See the LaTeX manual or LaTeX Companion for explanation.
    Type H <return> for immediate help

    C:\Users\username\Documents\sweave_test.tex:8: LaTeX Error: Environment Schunk
    undefined.

    See the LaTeX manual or LaTeX Companion for explanation.
    Type H <return> for immediate help

    C:\Users\username\Documents\sweave_test.tex:9: LaTeX Error: Environment Sinput
    undefined.

    See the LaTeX manual or LaTeX Companion for explanation.
    Type H <return> for immediate help

    C:\Users\username\Documents\sweave_test.tex:12: LaTeX Error: \begin{document}
    ended by \end{Sinput}.

    See the LaTeX manual or LaTeX Companion for explanation.
    Type H <return> for immediate help

    C:\Users\username\Documents\sweave_test.tex:13: LaTeX Error: Environment
    Soutput undefined.

    See the LaTeX manual or LaTeX Companion for explanation.
    Type H <return> for immediate help

    Overfull \hbox (20.0pt too wide) in paragraph at lines 1--15

    C:\Users\username\Documents\sweave_test.tex:16: LaTeX Error: Missing
    \begin{document}.

    See the LaTeX manual or LaTeX Companion for explanation.
    Type H <return> for immediate help

    C:\Users\username\Documents\sweave_test.tex:18: LaTeX Error: \begin{document}
    ended by \end{Soutput}.

    See the LaTeX manual or LaTeX Companion for explanation.
    Type H <return> for immediate help

    C:\Users\username\Documents\sweave_test.tex:19: LaTeX Error: \begin{document}
    ended by \end{Schunk}.

    See the LaTeX manual or LaTeX Companion for explanation.
    Type H <return> for immediate help
    C:\Users\username\Documents\sweave_test.tex:24: Undefined control sequence
    C:\Users\username\Documents\sweave_test.tex:24: Missing $ inserted
    C:\Users\username\Documents\sweave_test.tex:24: Extra }, or forgotten $

    C:\Users\username\Documents\sweave_t
    est.tex:25: LaTeX Error: Command \end{document} invalid in math mode.

    See the LaTeX manual or LaTeX Companion for explanation.
    Type H <return> for immediate help

    C:\Users\username\Documents\sweave_t
    est.tex:25: LaTeX Error: Something's wrong--perhaps a missing \item.

    See the LaTeX manual or LaTeX Companion for explanation.
    Type H <return> for immediate help

    C:\Users\username\Documents\sweave_test.tex:25: LaTeX Error: \begin{document}
    ended by \end{center}.

    See the LaTeX manual or LaTeX Companion for explanation.
    Type H <return> for immediate help
    C:\Users\username\Documents\sweave_test.tex:25: Missing $ inserted
    C:\Users\username\Documents\sweave_test.tex:25: Missing } inserted
    C:\Users\username\Documents\sweave_test.tex:25: Extra \endgroup

    Overfull \hbox (20.0pt too wide) in paragraph at lines 16--26

    Overfull \hbox (24.25352pt too wide) in paragraph at lines 16--26
    \OML/cmm/m/it/10 est \OMS/cmsy/m/n/10

    Overfull \hbox (15.00005pt too wide) in paragraph at lines 16--26
    \OT1/cmr/m/n/10 002$

    C:\Users\username\Documents\sweave_t
    est.tex:26: LaTeX Error: The font size command \normalsize is not defined:
    there is probably something wrong with the class file.

    See the LaTeX manual or LaTeX Companion for explanation.
    Type H <return> for immediate help

    C:\Users\username\Documents\sweave_test.tex:26: I can't find file
    `sweave_test.aux'.
    \enddocument ...keatletter \@@input \jobname .aux
    \fi \@dofilelist \ifdim \f...
    l.26 \end{document}

    Please type another input file name:

     
  • jcfaria

    jcfaria - 2012-02-29

    Alex,

    The viewer is the program used to read the DVI or PDF result of the
    compilation.
    It is necessary to define the path of your preferred for both DVI and PDF.

    See Options/Application/Processing/PDF - Viewer and
    Options/Application/Processing/DVI - Viewer

    For example:
    PDF: .../Programa files/Adobe/Reader 9.0/Reader/AcroRrd32.exe
    DVI: .../Programa files/MIKTex XX/miktex/bin/yap.exe

    HTH,
    JCFaria

     
  • jcfaria

    jcfaria - 2012-02-29

    Alex,

    Sorry, I can't support you related to LaTeX, only with Tinn-R.
    Basically it is necessary to have the file Sweave.sty (you will find it where
    R is installed) in the same folder that the myfile.tex, or, install it inside
    o MikTex. The latest it is the best. You will find instruction for it in the
    web.

    Best,
    JCFaria

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks