Hi, Yihui,

Attached is an HTML Diff report of the two files.  The left pane contains the 
R-2.15.0 file. 

Thanks.

--Mark




________________________________
 From: Yihui Xie <x...@yihui.name>
To: Mark Lamias <mlam...@yahoo.com> 
Cc: "r-help@r-project.org" <r-help@r-project.org> 
Sent: Thursday, November 29, 2012 2:43 PM
Subject: Re: [R] knitr error with Lyx
 
That is very helpful! Just to continue debugging, can you save the two
versions of the tex files produced from LyX with different versions of
R and do a diff on them? It sounds like something has changed from R
2.15.0 to 2.15.2.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Thu, Nov 29, 2012 at 1:26 PM, Mark Lamias <mlam...@yahoo.com> wrote:
> Thanks, Yihui!
>
> Luckily I kept R-2.15.0 and left it untouched (so I can continue to use that
> for now).  If it helps any, I was able to go back into Lyx and change the
> path to point to R-2.15.0 and I also changed the windows path environment
> variable to point to the old version.  After doing this, LyX worked fine
> with no problem on the code below.  Changing the paths back to the new
> version  R-2.15.2, generates the error below.
>
> If anyone else has any idea how to resolve this, either through R or a
> Lyx/LaTeX fix, I'd be all ears.
>
> Thanks, again for your response, Yihui!
>
>
> Sincerely yours,
>
> Mark J. Lamias
   C:\Users\Mark\Desktop\Test\2.15.0.tex C:\Users\Mark\Desktop\Test\2.15.2.tex
   \batchmode \batchmode
   \makeatletter \makeatletter
   \def\input@path{{C:/Users/Mark/Desktop//}}
   \def\input@path{{C:/Users/Mark/Desktop//}}
   \makeatother \makeatother
   \documentclass{article}   \documentclass{article}\usepackage{graphicx,
   color}
   \usepackage{graphicx, color}  %% maxwidth is the original width if it is
   less than linewidth
     %% otherwise use linewidth (to make sure the graphics do not exceed the
   margin)
     \makeatletter
     \def\maxwidth{ %
      \ifdim\Gin@nat@width>\linewidth
        \linewidth
      \else
        \Gin@nat@width
      \fi
     }
     \makeatother

     \IfFileExists{upquote.sty}{\usepackage{upquote}}{}
     \definecolor{fgcolor}{rgb}{0.2, 0.2, 0.2}
   \newcommand{\hlnumber}[1]{\textcolor[rgb]{0,0,0}{#1}}%
   \newcommand{\hlnumber}[1]{\textcolor[rgb]{0,0,0}{#1}}%
   \newcommand{\hlfunctioncall}[1]{\textcolor[rgb]{.5,0,.33}{\textbf{#1}}}%
   \newcommand{\hlfunctioncall}[1]{\textcolor[rgb]{0.501960784
   313725,0,0.329411764705882}{\textbf{#1}}}%
   \newcommand{\hlstring}[1]{\textcolor[rgb]{.6,.6,1}{#1}}%
   \newcommand{\hlstring}[1]{\textcolor[rgb]{0.6,0.6,1}{#1}}%
   \newcommand{\hlkeyword}[1]{\textbf{#1}}%
   \newcommand{\hlkeyword}[1]{\textcolor[rgb]{0,0,0}{\textbf{#1}}}%
   \newcommand{\hlargument}[1]{\textcolor[rgb]{.69,.25,.02}{#1}}%
   \newcommand{\hlargument}[1]{\textcolor[rgb]{0.6901960784313
   73,0.250980392156863,0.0196078431372549}{#1}}%
   \newcommand{\hlcomment}[1]{\textcolor[rgb]{.18,.6,.34}{#1}}%
   \newcommand{\hlcomment}[1]{\textcolor[rgb]{0.18039215686274
   5,0.6,0.341176470588235}{#1}}%
   \newcommand{\hlroxygencomment}[1]{\textcolor[rgb]{.44,.48,.7}{#1}}%
   \newcommand{\hlroxygencomment}[1]{\textcolor[rgb]{0.4392156
   8627451,0.47843137254902,0.701960784313725}{#1}}%
   \newcommand{\hlformalargs}[1]{\hlargument{#1}}%
   \newcommand{\hlformalargs}[1]{\textcolor[rgb]{0.69019607843
   1373,0.250980392156863,0.0196078431372549}{#1}}%
   \newcommand{\hleqformalargs}[1]{\hlargument{#1}}%
   \newcommand{\hleqformalargs}[1]{\textcolor[rgb]{0.690196078
   431373,0.250980392156863,0.0196078431372549}{#1}}%
   \newcommand{\hlassignement}[1]{\textbf{#1}}%
   \newcommand{\hlassignement}[1]{\textcolor[rgb]{0,0,0}{\textbf{#1}}}%
   \newcommand{\hlpackage}[1]{\textcolor[rgb]{.59,.71,.145}{#1}}%
   \newcommand{\hlpackage}[1]{\textcolor[rgb]{0.58823529411764
   7,0.709803921568627,0.145098039215686}{#1}}%
   \newcommand{\hlslot}[1]{\textit{#1}}% \newcommand{\hlslot}[1]{\textit{#1}}%
   \newcommand{\hlsymbol}[1]{#1}%
   \newcommand{\hlsymbol}[1]{\textcolor[rgb]{0,0,0}{#1}}%
   \newcommand{\hlprompt}[1]{\textcolor[rgb]{.5,.5,.5}{#1}}%
   \newcommand{\hlprompt}[1]{\textcolor[rgb]{0.2,0.2,0.2}{#1}}%

   \usepackage{color}%

   \newsavebox{\hlnormalsizeboxclosebrace}%
   \newsavebox{\hlnormalsizeboxopenbrace}%
   \newsavebox{\hlnormalsizeboxbackslash}%
   \newsavebox{\hlnormalsizeboxlessthan}%
   \newsavebox{\hlnormalsizeboxgreaterthan}%
   \newsavebox{\hlnormalsizeboxdollar}%
   \newsavebox{\hlnormalsizeboxunderscore}%
   \newsavebox{\hlnormalsizeboxand}%
   \newsavebox{\hlnormalsizeboxhash}%
   \newsavebox{\hlnormalsizeboxat}%
   \newsavebox{\hlnormalsizeboxpercent}%
   \newsavebox{\hlnormalsizeboxhat}%
   \newsavebox{\hlnormalsizeboxsinglequote}%
   \newsavebox{\hlnormalsizeboxbacktick}%

   \setbox\hlnormalsizeboxopenbrace=\hbox{\begin{normalsize}\v
   erb.{.\end{normalsize}}%
   \setbox\hlnormalsizeboxclosebrace=\hbox{\begin{normalsize}\
   verb.}.\end{normalsize}}%
   \setbox\hlnormalsizeboxlessthan=\hbox{\begin{normalsize}\ve
   rb.<.\end{normalsize}}%
   \setbox\hlnormalsizeboxdollar=\hbox{\begin{normalsize}\verb
   .$.\end{normalsize}}%
   \setbox\hlnormalsizeboxunderscore=\hbox{\begin{normalsize}\
   verb._.\end{normalsize}}%
   \setbox\hlnormalsizeboxand=\hbox{\begin{normalsize}\verb.&.
   \end{normalsize}}%
   \setbox\hlnormalsizeboxhash=\hbox{\begin{normalsize}\verb.#
   .\end{normalsize}}%
   \setbox\hlnormalsizeboxat=\hbox{\begin{normalsize}\verb.@.\end{normalsize}}%

   \setbox\hlnormalsizeboxbackslash=\hbox{\begin{normalsize}\v
   erb.\.\end{normalsize}}%
   \setbox\hlnormalsizeboxgreaterthan=\hbox{\begin{normalsize}
   \verb.>.\end{normalsize}}%
   \setbox\hlnormalsizeboxpercent=\hbox{\begin{normalsize}\ver
   b.%.\end{normalsize}}%
   \setbox\hlnormalsizeboxhat=\hbox{\begin{normalsize}\verb.^.
   \end{normalsize}}%
   \setbox\hlnormalsizeboxsinglequote=\hbox{\begin{normalsize}
   \verb.'.\end{normalsize}}%
   \setbox\hlnormalsizeboxbacktick=\hbox{\begin{normalsize}\ve
   rb.`.\end{normalsize}}%
   \setbox\hlnormalsizeboxhat=\hbox{\begin{normalsize}\verb.^.
   \end{normalsize}}%



   \newsavebox{\hltinyboxclosebrace}%
   \newsavebox{\hltinyboxopenbrace}%
   \newsavebox{\hltinyboxbackslash}%
   \newsavebox{\hltinyboxlessthan}%
   \newsavebox{\hltinyboxgreaterthan}%
   \newsavebox{\hltinyboxdollar}%
   \newsavebox{\hltinyboxunderscore}%
   \newsavebox{\hltinyboxand}%
   \newsavebox{\hltinyboxhash}%
   \newsavebox{\hltinyboxat}%
   \newsavebox{\hltinyboxpercent}%
   \newsavebox{\hltinyboxhat}%
   \newsavebox{\hltinyboxsinglequote}%
   \newsavebox{\hltinyboxbacktick}%

   \setbox\hltinyboxopenbrace=\hbox{\begin{tiny}\verb.{.\end{tiny}}%
   \setbox\hltinyboxclosebrace=\hbox{\begin{tiny}\verb.}.\end{tiny}}%
   \setbox\hltinyboxlessthan=\hbox{\begin{tiny}\verb.<.\end{tiny}}%
   \setbox\hltinyboxdollar=\hbox{\begin{tiny}\verb.$.\end{tiny}}%
   \setbox\hltinyboxunderscore=\hbox{\begin{tiny}\verb._.\end{tiny}}%
   \setbox\hltinyboxand=\hbox{\begin{tiny}\verb.&.\end{tiny}}%
   \setbox\hltinyboxhash=\hbox{\begin{tiny}\verb.#.\end{tiny}}%
   \setbox\hltinyboxat=\hbox{\begin{tiny}\verb.@.\end{tiny}}%
   \setbox\hltinyboxbackslash=\hbox{\begin{tiny}\verb.\.\end{tiny}}%
   \setbox\hltinyboxgreaterthan=\hbox{\begin{tiny}\verb.>.\end{tiny}}%
   \setbox\hltinyboxpercent=\hbox{\begin{tiny}\verb.%.\end{tiny}}%
   \setbox\hltinyboxhat=\hbox{\begin{tiny}\verb.^.\end{tiny}}%
   \setbox\hltinyboxsinglequote=\hbox{\begin{tiny}\verb.'.\end{tiny}}%
   \setbox\hltinyboxbacktick=\hbox{\begin{tiny}\verb.`.\end{tiny}}%
   \setbox\hltinyboxhat=\hbox{\begin{tiny}\verb.^.\end{tiny}}%



   \newsavebox{\hlscriptsizeboxclosebrace}%
   \newsavebox{\hlscriptsizeboxopenbrace}%
   \newsavebox{\hlscriptsizeboxbackslash}%
   \newsavebox{\hlscriptsizeboxlessthan}%
   \newsavebox{\hlscriptsizeboxgreaterthan}%
   \newsavebox{\hlscriptsizeboxdollar}%
   \newsavebox{\hlscriptsizeboxunderscore}%
   \newsavebox{\hlscriptsizeboxand}%
   \newsavebox{\hlscriptsizeboxhash}%
   \newsavebox{\hlscriptsizeboxat}%
   \newsavebox{\hlscriptsizeboxpercent}%
   \newsavebox{\hlscriptsizeboxhat}%
   \newsavebox{\hlscriptsizeboxsinglequote}%
   \newsavebox{\hlscriptsizeboxbacktick}%

   \setbox\hlscriptsizeboxopenbrace=\hbox{\begin{scriptsize}\v
   erb.{.\end{scriptsize}}%
   \setbox\hlscriptsizeboxclosebrace=\hbox{\begin{scriptsize}\
   verb.}.\end{scriptsize}}%
   \setbox\hlscriptsizeboxlessthan=\hbox{\begin{scriptsize}\ve
   rb.<.\end{scriptsize}}%
   \setbox\hlscriptsizeboxdollar=\hbox{\begin{scriptsize}\verb
   .$.\end{scriptsize}}%
   \setbox\hlscriptsizeboxunderscore=\hbox{\begin{scriptsize}\
   verb._.\end{scriptsize}}%
   \setbox\hlscriptsizeboxand=\hbox{\begin{scriptsize}\verb.&.
   \end{scriptsize}}%
   \setbox\hlscriptsizeboxhash=\hbox{\begin{scriptsize}\verb.#
   .\end{scriptsize}}%
   \setbox\hlscriptsizeboxat=\hbox{\begin{scriptsize}\verb.@.\end{scriptsize}}%

   \setbox\hlscriptsizeboxbackslash=\hbox{\begin{scriptsize}\v
   erb.\.\end{scriptsize}}%
   \setbox\hlscriptsizeboxgreaterthan=\hbox{\begin{scriptsize}
   \verb.>.\end{scriptsize}}%
   \setbox\hlscriptsizeboxpercent=\hbox{\begin{scriptsize}\ver
   b.%.\end{scriptsize}}%
   \setbox\hlscriptsizeboxhat=\hbox{\begin{scriptsize}\verb.^.
   \end{scriptsize}}%
   \setbox\hlscriptsizeboxsinglequote=\hbox{\begin{scriptsize}
   \verb.'.\end{scriptsize}}%
   \setbox\hlscriptsizeboxbacktick=\hbox{\begin{scriptsize}\ve
   rb.`.\end{scriptsize}}%
   \setbox\hlscriptsizeboxhat=\hbox{\begin{scriptsize}\verb.^.
   \end{scriptsize}}%



   \newsavebox{\hlfootnotesizeboxclosebrace}%
   \newsavebox{\hlfootnotesizeboxopenbrace}%
   \newsavebox{\hlfootnotesizeboxbackslash}%
   \newsavebox{\hlfootnotesizeboxlessthan}%
   \newsavebox{\hlfootnotesizeboxgreaterthan}%
   \newsavebox{\hlfootnotesizeboxdollar}%
   \newsavebox{\hlfootnotesizeboxunderscore}%
   \newsavebox{\hlfootnotesizeboxand}%
   \newsavebox{\hlfootnotesizeboxhash}%
   \newsavebox{\hlfootnotesizeboxat}%
   \newsavebox{\hlfootnotesizeboxpercent}%
   \newsavebox{\hlfootnotesizeboxhat}%
   \newsavebox{\hlfootnotesizeboxsinglequote}%
   \newsavebox{\hlfootnotesizeboxbacktick}%

   \setbox\hlfootnotesizeboxopenbrace=\hbox{\begin{footnotesiz
   e}\verb.{.\end{footnotesize}}%
   \setbox\hlfootnotesizeboxclosebrace=\hbox{\begin{footnotesi
   ze}\verb.}.\end{footnotesize}}%
   \setbox\hlfootnotesizeboxlessthan=\hbox{\begin{footnotesize
   }\verb.<.\end{footnotesize}}%
   \setbox\hlfootnotesizeboxdollar=\hbox{\begin{footnotesize}\
   verb.$.\end{footnotesize}}%
   \setbox\hlfootnotesizeboxunderscore=\hbox{\begin{footnotesi
   ze}\verb._.\end{footnotesize}}%
   \setbox\hlfootnotesizeboxand=\hbox{\begin{footnotesize}\ver
   b.&.\end{footnotesize}}%
   \setbox\hlfootnotesizeboxhash=\hbox{\begin{footnotesize}\ve
   rb.#.\end{footnotesize}}%
   \setbox\hlfootnotesizeboxat=\hbox{\begin{footnotesize}\verb
   .@.\end{footnotesize}}%
   \setbox\hlfootnotesizeboxbackslash=\hbox{\begin{footnotesiz
   e}\verb.\.\end{footnotesize}}%
   \setbox\hlfootnotesizeboxgreaterthan=\hbox{\begin{footnotes
   ize}\verb.>.\end{footnotesize}}%
   \setbox\hlfootnotesizeboxpercent=\hbox{\begin{footnotesize}
   \verb.%.\end{footnotesize}}%
   \setbox\hlfootnotesizeboxhat=\hbox{\begin{footnotesize}\ver
   b.^.\end{footnotesize}}%
   \setbox\hlfootnotesizeboxsinglequote=\hbox{\begin{footnotes
   ize}\verb.'.\end{footnotesize}}%
   \setbox\hlfootnotesizeboxbacktick=\hbox{\begin{footnotesize
   }\verb.`.\end{footnotesize}}%
   \setbox\hlfootnotesizeboxhat=\hbox{\begin{footnotesize}\ver
   b.^.\end{footnotesize}}%



   \newsavebox{\hlsmallboxclosebrace}%
   \newsavebox{\hlsmallboxopenbrace}%
   \newsavebox{\hlsmallboxbackslash}%
   \newsavebox{\hlsmallboxlessthan}%
   \newsavebox{\hlsmallboxgreaterthan}%
   \newsavebox{\hlsmallboxdollar}%
   \newsavebox{\hlsmallboxunderscore}%
   \newsavebox{\hlsmallboxand}%
   \newsavebox{\hlsmallboxhash}%
   \newsavebox{\hlsmallboxat}%
   \newsavebox{\hlsmallboxpercent}%
   \newsavebox{\hlsmallboxhat}%
   \newsavebox{\hlsmallboxsinglequote}%
   \newsavebox{\hlsmallboxbacktick}%

   \setbox\hlsmallboxopenbrace=\hbox{\begin{small}\verb.{.\end{small}}%
   \setbox\hlsmallboxclosebrace=\hbox{\begin{small}\verb.}.\end{small}}%
   \setbox\hlsmallboxlessthan=\hbox{\begin{small}\verb.<.\end{small}}%
   \setbox\hlsmallboxdollar=\hbox{\begin{small}\verb.$.\end{small}}%
   \setbox\hlsmallboxunderscore=\hbox{\begin{small}\verb._.\end{small}}%
   \setbox\hlsmallboxand=\hbox{\begin{small}\verb.&.\end{small}}%
   \setbox\hlsmallboxhash=\hbox{\begin{small}\verb.#.\end{small}}%
   \setbox\hlsmallboxat=\hbox{\begin{small}\verb.@.\end{small}}%
   \setbox\hlsmallboxbackslash=\hbox{\begin{small}\verb.\.\end{small}}%
   \setbox\hlsmallboxgreaterthan=\hbox{\begin{small}\verb.>.\end{small}}%
   \setbox\hlsmallboxpercent=\hbox{\begin{small}\verb.%.\end{small}}%
   \setbox\hlsmallboxhat=\hbox{\begin{small}\verb.^.\end{small}}%
   \setbox\hlsmallboxsinglequote=\hbox{\begin{small}\verb.'.\end{small}}%
   \setbox\hlsmallboxbacktick=\hbox{\begin{small}\verb.`.\end{small}}%
   \setbox\hlsmallboxhat=\hbox{\begin{small}\verb.^.\end{small}}%



   \newsavebox{\hllargeboxclosebrace}%
   \newsavebox{\hllargeboxopenbrace}%
   \newsavebox{\hllargeboxbackslash}%
   \newsavebox{\hllargeboxlessthan}%
   \newsavebox{\hllargeboxgreaterthan}%
   \newsavebox{\hllargeboxdollar}%
   \newsavebox{\hllargeboxunderscore}%
   \newsavebox{\hllargeboxand}%
   \newsavebox{\hllargeboxhash}%
   \newsavebox{\hllargeboxat}%
   \newsavebox{\hllargeboxpercent}%
   \newsavebox{\hllargeboxhat}%
   \newsavebox{\hllargeboxsinglequote}%
   \newsavebox{\hllargeboxbacktick}%

   \setbox\hllargeboxopenbrace=\hbox{\begin{large}\verb.{.\end{large}}%
   \setbox\hllargeboxclosebrace=\hbox{\begin{large}\verb.}.\end{large}}%
   \setbox\hllargeboxlessthan=\hbox{\begin{large}\verb.<.\end{large}}%
   \setbox\hllargeboxdollar=\hbox{\begin{large}\verb.$.\end{large}}%
   \setbox\hllargeboxunderscore=\hbox{\begin{large}\verb._.\end{large}}%
   \setbox\hllargeboxand=\hbox{\begin{large}\verb.&.\end{large}}%
   \setbox\hllargeboxhash=\hbox{\begin{large}\verb.#.\end{large}}%
   \setbox\hllargeboxat=\hbox{\begin{large}\verb.@.\end{large}}%
   \setbox\hllargeboxbackslash=\hbox{\begin{large}\verb.\.\end{large}}%
   \setbox\hllargeboxgreaterthan=\hbox{\begin{large}\verb.>.\end{large}}%
   \setbox\hllargeboxpercent=\hbox{\begin{large}\verb.%.\end{large}}%
   \setbox\hllargeboxhat=\hbox{\begin{large}\verb.^.\end{large}}%
   \setbox\hllargeboxsinglequote=\hbox{\begin{large}\verb.'.\end{large}}%
   \setbox\hllargeboxbacktick=\hbox{\begin{large}\verb.`.\end{large}}%
   \setbox\hllargeboxhat=\hbox{\begin{large}\verb.^.\end{large}}%



   \newsavebox{\hlLargeboxclosebrace}%
   \newsavebox{\hlLargeboxopenbrace}%
   \newsavebox{\hlLargeboxbackslash}%
   \newsavebox{\hlLargeboxlessthan}%
   \newsavebox{\hlLargeboxgreaterthan}%
   \newsavebox{\hlLargeboxdollar}%
   \newsavebox{\hlLargeboxunderscore}%
   \newsavebox{\hlLargeboxand}%
   \newsavebox{\hlLargeboxhash}%
   \newsavebox{\hlLargeboxat}%
   \newsavebox{\hlLargeboxpercent}%
   \newsavebox{\hlLargeboxhat}%
   \newsavebox{\hlLargeboxsinglequote}%
   \newsavebox{\hlLargeboxbacktick}%

   \setbox\hlLargeboxopenbrace=\hbox{\begin{Large}\verb.{.\end{Large}}%
   \setbox\hlLargeboxclosebrace=\hbox{\begin{Large}\verb.}.\end{Large}}%
   \setbox\hlLargeboxlessthan=\hbox{\begin{Large}\verb.<.\end{Large}}%
   \setbox\hlLargeboxdollar=\hbox{\begin{Large}\verb.$.\end{Large}}%
   \setbox\hlLargeboxunderscore=\hbox{\begin{Large}\verb._.\end{Large}}%
   \setbox\hlLargeboxand=\hbox{\begin{Large}\verb.&.\end{Large}}%
   \setbox\hlLargeboxhash=\hbox{\begin{Large}\verb.#.\end{Large}}%
   \setbox\hlLargeboxat=\hbox{\begin{Large}\verb.@.\end{Large}}%
   \setbox\hlLargeboxbackslash=\hbox{\begin{Large}\verb.\.\end{Large}}%
   \setbox\hlLargeboxgreaterthan=\hbox{\begin{Large}\verb.>.\end{Large}}%
   \setbox\hlLargeboxpercent=\hbox{\begin{Large}\verb.%.\end{Large}}%
   \setbox\hlLargeboxhat=\hbox{\begin{Large}\verb.^.\end{Large}}%
   \setbox\hlLargeboxsinglequote=\hbox{\begin{Large}\verb.'.\end{Large}}%
   \setbox\hlLargeboxbacktick=\hbox{\begin{Large}\verb.`.\end{Large}}%
   \setbox\hlLargeboxhat=\hbox{\begin{Large}\verb.^.\end{Large}}%



   \newsavebox{\hlLARGEboxclosebrace}%
   \newsavebox{\hlLARGEboxopenbrace}%
   \newsavebox{\hlLARGEboxbackslash}%
   \newsavebox{\hlLARGEboxlessthan}%
   \newsavebox{\hlLARGEboxgreaterthan}%
   \newsavebox{\hlLARGEboxdollar}%
   \newsavebox{\hlLARGEboxunderscore}%
   \newsavebox{\hlLARGEboxand}%
   \newsavebox{\hlLARGEboxhash}%
   \newsavebox{\hlLARGEboxat}%
   \newsavebox{\hlLARGEboxpercent}%
   \newsavebox{\hlLARGEboxhat}%
   \newsavebox{\hlLARGEboxsinglequote}%
   \newsavebox{\hlLARGEboxbacktick}%

   \setbox\hlLARGEboxopenbrace=\hbox{\begin{LARGE}\verb.{.\end{LARGE}}%
   \setbox\hlLARGEboxclosebrace=\hbox{\begin{LARGE}\verb.}.\end{LARGE}}%
   \setbox\hlLARGEboxlessthan=\hbox{\begin{LARGE}\verb.<.\end{LARGE}}%
   \setbox\hlLARGEboxdollar=\hbox{\begin{LARGE}\verb.$.\end{LARGE}}%
   \setbox\hlLARGEboxunderscore=\hbox{\begin{LARGE}\verb._.\end{LARGE}}%
   \setbox\hlLARGEboxand=\hbox{\begin{LARGE}\verb.&.\end{LARGE}}%
   \setbox\hlLARGEboxhash=\hbox{\begin{LARGE}\verb.#.\end{LARGE}}%
   \setbox\hlLARGEboxat=\hbox{\begin{LARGE}\verb.@.\end{LARGE}}%
   \setbox\hlLARGEboxbackslash=\hbox{\begin{LARGE}\verb.\.\end{LARGE}}%
   \setbox\hlLARGEboxgreaterthan=\hbox{\begin{LARGE}\verb.>.\end{LARGE}}%
   \setbox\hlLARGEboxpercent=\hbox{\begin{LARGE}\verb.%.\end{LARGE}}%
   \setbox\hlLARGEboxhat=\hbox{\begin{LARGE}\verb.^.\end{LARGE}}%
   \setbox\hlLARGEboxsinglequote=\hbox{\begin{LARGE}\verb.'.\end{LARGE}}%
   \setbox\hlLARGEboxbacktick=\hbox{\begin{LARGE}\verb.`.\end{LARGE}}%
   \setbox\hlLARGEboxhat=\hbox{\begin{LARGE}\verb.^.\end{LARGE}}%



   \newsavebox{\hlhugeboxclosebrace}%
   \newsavebox{\hlhugeboxopenbrace}%
   \newsavebox{\hlhugeboxbackslash}%
   \newsavebox{\hlhugeboxlessthan}%
   \newsavebox{\hlhugeboxgreaterthan}%
   \newsavebox{\hlhugeboxdollar}%
   \newsavebox{\hlhugeboxunderscore}%
   \newsavebox{\hlhugeboxand}%
   \newsavebox{\hlhugeboxhash}%
   \newsavebox{\hlhugeboxat}%
   \newsavebox{\hlhugeboxpercent}%
   \newsavebox{\hlhugeboxhat}%
   \newsavebox{\hlhugeboxsinglequote}%
   \newsavebox{\hlhugeboxbacktick}%

   \setbox\hlhugeboxopenbrace=\hbox{\begin{huge}\verb.{.\end{huge}}%
   \setbox\hlhugeboxclosebrace=\hbox{\begin{huge}\verb.}.\end{huge}}%
   \setbox\hlhugeboxlessthan=\hbox{\begin{huge}\verb.<.\end{huge}}%
   \setbox\hlhugeboxdollar=\hbox{\begin{huge}\verb.$.\end{huge}}%
   \setbox\hlhugeboxunderscore=\hbox{\begin{huge}\verb._.\end{huge}}%
   \setbox\hlhugeboxand=\hbox{\begin{huge}\verb.&.\end{huge}}%
   \setbox\hlhugeboxhash=\hbox{\begin{huge}\verb.#.\end{huge}}%
   \setbox\hlhugeboxat=\hbox{\begin{huge}\verb.@.\end{huge}}%
   \setbox\hlhugeboxbackslash=\hbox{\begin{huge}\verb.\.\end{huge}}%
   \setbox\hlhugeboxgreaterthan=\hbox{\begin{huge}\verb.>.\end{huge}}%
   \setbox\hlhugeboxpercent=\hbox{\begin{huge}\verb.%.\end{huge}}%
   \setbox\hlhugeboxhat=\hbox{\begin{huge}\verb.^.\end{huge}}%
   \setbox\hlhugeboxsinglequote=\hbox{\begin{huge}\verb.'.\end{huge}}%
   \setbox\hlhugeboxbacktick=\hbox{\begin{huge}\verb.`.\end{huge}}%
   \setbox\hlhugeboxhat=\hbox{\begin{huge}\verb.^.\end{huge}}%



   \newsavebox{\hlHugeboxclosebrace}%
   \newsavebox{\hlHugeboxopenbrace}%
   \newsavebox{\hlHugeboxbackslash}%
   \newsavebox{\hlHugeboxlessthan}%
   \newsavebox{\hlHugeboxgreaterthan}%
   \newsavebox{\hlHugeboxdollar}%
   \newsavebox{\hlHugeboxunderscore}%
   \newsavebox{\hlHugeboxand}%
   \newsavebox{\hlHugeboxhash}%
   \newsavebox{\hlHugeboxat}%
   \newsavebox{\hlHugeboxpercent}%
   \newsavebox{\hlHugeboxhat}%
   \newsavebox{\hlHugeboxsinglequote}%
   \newsavebox{\hlHugeboxbacktick}%

   \setbox\hlHugeboxopenbrace=\hbox{\begin{Huge}\verb.{.\end{Huge}}%
   \setbox\hlHugeboxclosebrace=\hbox{\begin{Huge}\verb.}.\end{Huge}}%
   \setbox\hlHugeboxlessthan=\hbox{\begin{Huge}\verb.<.\end{Huge}}%
   \setbox\hlHugeboxdollar=\hbox{\begin{Huge}\verb.$.\end{Huge}}%
   \setbox\hlHugeboxunderscore=\hbox{\begin{Huge}\verb._.\end{Huge}}%
   \setbox\hlHugeboxand=\hbox{\begin{Huge}\verb.&.\end{Huge}}%
   \setbox\hlHugeboxhash=\hbox{\begin{Huge}\verb.#.\end{Huge}}%
   \setbox\hlHugeboxat=\hbox{\begin{Huge}\verb.@.\end{Huge}}%
   \setbox\hlHugeboxbackslash=\hbox{\begin{Huge}\verb.\.\end{Huge}}%
   \setbox\hlHugeboxgreaterthan=\hbox{\begin{Huge}\verb.>.\end{Huge}}%
   \setbox\hlHugeboxpercent=\hbox{\begin{Huge}\verb.%.\end{Huge}}%
   \setbox\hlHugeboxhat=\hbox{\begin{Huge}\verb.^.\end{Huge}}%
   \setbox\hlHugeboxsinglequote=\hbox{\begin{Huge}\verb.'.\end{Huge}}%
   \setbox\hlHugeboxbacktick=\hbox{\begin{Huge}\verb.`.\end{Huge}}%
   \setbox\hlHugeboxhat=\hbox{\begin{Huge}\verb.^.\end{Huge}}%


   \def\urltilda{\kern -.15em\lower .7ex\hbox{\~{}}\kern .04em}%

   \newcommand{\hlstd}[1]{\textcolor[rgb]{0,0,0}{#1}}%
   \newcommand{\hlnum}[1]{\textcolor[rgb]{0.16,0.16,1}{#1}}
   \newcommand{\hlesc}[1]{\textcolor[rgb]{1,0,1}{#1}}
   \newcommand{\hlstr}[1]{\textcolor[rgb]{1,0,0}{#1}}
   \newcommand{\hldstr}[1]{\textcolor[rgb]{0.51,0.51,0}{#1}}
   \newcommand{\hlslc}[1]{\textcolor[rgb]{0.51,0.51,0.51}{\it{#1}}}
   \newcommand{\hlcom}[1]{\textcolor[rgb]{0.51,0.51,0.51}{\it{#1}}}
   \newcommand{\hldir}[1]{\textcolor[rgb]{0,0.51,0}{#1}}
   \newcommand{\hlsym}[1]{\textcolor[rgb]{0,0,0}{#1}}
   \newcommand{\hlline}[1]{\textcolor[rgb]{0.33,0.33,0.33}{#1}}
   \newcommand{\hlkwa}[1]{\textcolor[rgb]{0,0,0}{\bf{#1}}}
   \newcommand{\hlkwb}[1]{\textcolor[rgb]{0.51,0,0}{#1}}
   \newcommand{\hlkwc}[1]{\textcolor[rgb]{0,0,0}{\bf{#1}}}
   \newcommand{\hlkwd}[1]{\textcolor[rgb]{0,0,0.51}{#1}}

   \definecolor{fgcolor}{rgb}{0,0,0}
   \usepackage{framed} \usepackage{framed}
   \makeatletter \makeatletter
   \newenvironment{kframe}{% \newenvironment{kframe}{%
     \def\at@end@of@kframe{}%
     \ifinner\ifhmode%
      \def\at@end@of@kframe{\end{minipage}}%
      \begin{minipage}{\columnwidth}%
     \fi\fi%
   \def\FrameCommand##1{\hskip\@totalleftmargin           \hskip-\fboxsep
   \def\FrameCommand##1{\hskip\@totalleftmargin \hskip-\fboxsep
   \colorbox{shadecolor}{##1}\hskip-\fboxsep
   \colorbox{shadecolor}{##1}\hskip-\fboxsep
         %  There  is  no  \@totalrightmargin,  so:        %  There is no
   \\@totalrightmargin, so:
         \hskip-\linewidth  \hskip-\@totalleftmargin \hskip\columnwidth}%
   \hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}%
   \MakeFramed {\advance\hsize-\width \MakeFramed {\advance\hsize-\width
       \@totalleftmargin\z@   \linewidth\hsize       \@totalleftmargin\z@
   \linewidth\hsize
     \@setminipage}}%   \@setminipage}}%
   {\par\unskip\endMakeFramed}  {\par\unskip\endMakeFramed%
     \at@end@of@kframe}
   \makeatother \makeatother

   \definecolor{shadecolor}{rgb}{.97, .97, .97}
   \definecolor{shadecolor}{rgb}{.97, .97, .97}
     \definecolor{messagecolor}{rgb}{0, 0, 0}
     \definecolor{warningcolor}{rgb}{1, 0, 1}
     \definecolor{errorcolor}{rgb}{1, 0, 0}
   \newenvironment{knitrout}{}{} % an empty environment to be redefined in TeX
   \newenvironment{knitrout}{}{} % an empty environment to be redefined in TeX

   \newcommand{\SweaveOpts}[1]{}    %   do   not   interfere  with  LaTeX
   \usepackage{alltt}
   \newcommand{\SweaveInput}[1]{} % because they are not real TeX commands
   \newcommand{\Sexpr}[1]{}       % will only be parsed by R

   \usepackage[T1]{fontenc} \usepackage[T1]{fontenc}
   \usepackage[latin9]{inputenc} \usepackage[latin9]{inputenc}
   \usepackage{fancyhdr} \usepackage{fancyhdr}
   \pagestyle{fancy} \pagestyle{fancy}
   \setcounter{secnumdepth}{0} \setcounter{secnumdepth}{0}
   \usepackage{amsmath} \usepackage{amsmath}
   \usepackage{amssymb} \usepackage{amssymb}
   \begin{document} \begin{document}
   \begin{knitrout} \begin{knitrout}
   \definecolor{shadecolor}{rgb}{0.969, 0.969,
   0.969}\color{fgcolor}\begin{kframe}\definecolor{shadecolor}{rgb}{0.969,
   0.969, 0.969}\color{fgcolor}\begin{kframe}
   \begin{flushleft}  \begin{alltt}
   \ttfamily\noindent  \hlcomment{# Read in data}
   \hlcomment{\usebox{\hlnormalsizeboxhash}{\        }Read{\        }in{\
   }data}\hspace*{\fill}\\   y = \hlfunctioncall{c}(67, 73, 83, 89, 65, 91, 87,
   86, 155, 127, 147, 212, 108, 100, 90, 153,
   \hlstd{}\hlsymbol{y}{\ }\hlassignement{=}{\
   }\hlfunctioncall{c}\hlkeyword{(}\hlnumber{67}\hlkeyword{,}{\
   }\hlnumber{73}\hlkeyword{,}{\            }\hlnumber{83}\hlkeyword{,}{\
   }\hlnumber{89}\hlkeyword{,}{\            }\hlnumber{65}\hlkeyword{,}{\
   }\hlnumber{91}\hlkeyword{,}{\            }\hlnumber{87}\hlkeyword{,}{\
   }\hlnumber{86}\hlkeyword{,}{\           }\hlnumber{155}\hlkeyword{,}{\
   }\hlnumber{127}\hlkeyword{,}{\          }\hlnumber{147}\hlkeyword{,}{\
   }\hlnumber{212}\hlkeyword{,}{\          }\hlnumber{108}\hlkeyword{,}{\
   }\hlnumber{100}\hlkeyword{,}\hspace*{\fill}\\     140, 142, 121, 150, 33, 8,
   46, 54)
   \hlstd{}{\      }{\      }{\     }{\     }\hlnumber{90}\hlkeyword{,}{\
   }\hlnumber{153}\hlkeyword{,}{\          }\hlnumber{140}\hlkeyword{,}{\
   }\hlnumber{142}\hlkeyword{,}{\          }\hlnumber{121}\hlkeyword{,}{\
   }\hlnumber{150}\hlkeyword{,}{\           }\hlnumber{33}\hlkeyword{,}{\
   }\hlnumber{8}\hlkeyword{,}{\             }\hlnumber{46}\hlkeyword{,}{\
   }\hlnumber{54}\hlkeyword{)}\hspace*{\fill}\\               temp      =
   \hlfunctioncall{as.factor}(\hlfunctioncall{c}(\hlfunctionca
   ll{rep}(\hlfunctioncall{seq}(360,     380,    10),    each    =    4),
   \hlfunctioncall{rep}(\hlfunctioncall{seq}(380, 360, -10),
   \hlstd{}\hlsymbol{temp}{\                         }\hlassignement{=}{\
   }\hlfunctioncall{as.factor}\hlkeyword{(}\hlfunctioncall{c}\
   hlkeyword{(}\hlfunctioncall{rep}\hlkeyword{(}\hlfunctioncal
   l{seq}\hlkeyword{(}\hlnumber{360}\hlkeyword{,}{\
   }\hlnumber{380}\hlkeyword{,}{\}\hlnumber{10}\hlkeyword{)}\hlkeyword{,}{\
   }\hlargument{each}{\ }\hlargument{=}{\
   }\hlnumber{4}\hlkeyword{)}\hlkeyword{,}{\
   }\hlfunctioncall{rep}\hlkeyword{(}\hlfunctioncall{seq}\hlke
   yword{(}\hlnumber{380}\hlkeyword{,}\hspace*{\fill}\\     each = 4)))
   \hlstd{}{\      }{\     }{\     }{\     }\hlnumber{360}\hlkeyword{,}{\
   }\hlkeyword{-}\hlnumber{10}\hlkeyword{)}\hlkeyword{,}{\}\hlargument{each}{\
   }\hlargument{=}{\
   }\hlnumber{4}\hlkeyword{)}\hlkeyword{)}\hlkeyword{)}\hspace*{\fill}\\coat
   =\hlfunctioncall{as.factor}(\hlfunctioncall{rep}(\hlfunctioncall{seq}(1,
   4), 6))
   \hlstd{}\hlsymbol{coat}{\                         }\hlassignement{=}{\
   }\hlfunctioncall{as.factor}\hlkeyword{(}\hlfunctioncall{rep
   }\hlkeyword{(}\hlfunctioncall{seq}\hlkeyword{(}\hlnumber{1}\hlkeyword{,}{\
   }\hlnumber{4}\hlkeyword{)}\hlkeyword{,}{\
   }\hlnumber{6}\hlkeyword{)}\hlkeyword{)}\hspace*{\fill}\\   replicate =
   \hlfunctioncall{as.factor}(\hlfunctioncall{rep}(\hlfunctioncall{seq}(1,6),
   each = 4))
   \hlstd{}\hlsymbol{replicate}{\                    }\hlassignement{=}{\
   }\hlfunctioncall{as.factor}\hlkeyword{(}\hlfunctioncall{rep
   }\hlkeyword{(}\hlfunctioncall{seq}\hlkeyword{(}\hlnumber{1}\hlkeyword{,}{\
   }\hlnumber{6}\hlkeyword{)}\hlkeyword{,}{\         }\hlargument{each}{\
   }\hlargument{=}{\}\hlnumber{4}\hlkeyword{)}\hlkeyword{)}\hspace*{\fill}\\
   \hlcomment{# Obtain Factorial/Incorrect Model}
   \hlstd{}\hlcomment{\usebox{\hlnormalsizeboxhash}{\           }Obtain{\
   }Factorial/Incorrect{\ }Model}\hspace*{\fill}\\  o = \hlfunctioncall{lm}(y ~
   temp * coat)
   \hlstd{}\hlsymbol{o}{\ }\hlassignement{=}{\
   }\hlfunctioncall{lm}\hlkeyword{(}\hlsymbol{y}{\}\hlkeyword{\urltilda{}}{\
   }\hlsymbol{temp}{\ }\hlkeyword{*}{\
   }\hlsymbol{coat}\hlkeyword{)}\hspace*{\fill}\\           ano         =
   \hlfunctioncall{anova}(o)
   \hlstd{}\hlsymbol{ano}{\                          }\hlassignement{=}{\
   }\hlfunctioncall{anova}\hlkeyword{(}\hlsymbol{o}\hlkeyword{
   )}\hspace*{\fill}\\  ano
   \hlstd{}\hlsymbol{ano}\mbox{}  \end{alltt}
   \normalfont
   \end{flushleft}
   \begin{verbatim} \begin{verbatim}
   ## Analysis of Variance Table ## Analysis of Variance Table
   ##   ##
   ## Response: y ## Response: y
   ##           Df Sum Sq Mean Sq F value Pr(>F)     ##           Df Sum Sq
   Mean Sq F value Pr(>F)
   ## temp       2  26519   13260   10.23 0.0026 ** ## temp       2  26519
   13260   10.23 0.0026 **
   ## coat       3   4289    1430    1.10 0.3860     ## coat       3   4289
   1430    1.10 0.3860
   ## temp:coat  6   3270     545    0.42 0.8518     ## temp:coat  6   3270
   545    0.42 0.8518
   ## Residuals 12  15560    1297                    ## Residuals 12  15560
   1297
   ## --- ## ---
   ## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1   ##
   Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
   \end{verbatim} \end{verbatim}
   \end{kframe} \end{kframe}
   \end{knitrout} \end{knitrout}


   \end{document} \end{document}
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to