On Fri, 3 Jul 2015, Scott Kostyshak wrote:

On Fri, Jul 03, 2015 at 10:21:27AM -0700, Rich Shepard wrote:
  Here's the chunk:

<<show-off>>=
rnorm(5)
@

Just to be clear, the above is in ERT or in the Chunk inset?

Scott,

  Chunk.

Can you please send the document with the above "chunk" in it?

  Later.

OK the important thing when debugging a knitr LyX document is: did the
error come from R or from LaTeX? Here it comes from LaTeX, which is
strange. I'm still concerned that water-chemistry-analyses.tex is not a
simple file. Can we work with a simple file first and can you send the
simple file to the list? Let's try the rnorm(5) above.

  Attached is knitr-test.lyx ... which compiles.

Rich
#LyX 2.1 created this file. For more info see http://www.lyx.org/
\lyxformat 474
\begin_document
\begin_header
\textclass scrartcl
\begin_preamble
\date{}
\usepackage{textcomp,url,multicol}
\setkomafont{sectioning}{\rmfamily}
\end_preamble
\use_default_options true
\begin_modules
knitr
\end_modules
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman palatino
\font_sans default
\font_typewriter default
\font_math auto
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command bibtex
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize letterpaper
\use_geometry false
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 0
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine natbib
\cite_engine_type authoryear
\biblio_style plainnat
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 0
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 2
\tocdepth 2
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 2
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Title
This is a simple test file
\end_layout

\begin_layout Standard
Let's see what happens if we try a smidgen of R without coding the chunk
 beginning and ending:
\end_layout

\begin_layout Standard
\begin_inset Flex Chunk
status open

\begin_layout Plain Layout

rnorm(10)
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Wonder where chunk 1 appeard.
\end_layout

\begin_layout Standard
And now with explicit beginning and ending:
\end_layout

\begin_layout Standard
\begin_inset Flex Chunk
status open

\begin_layout Plain Layout

<<test>>=
\end_layout

\begin_layout Plain Layout

rnorm(10)
\end_layout

\begin_layout Plain Layout

@
\end_layout

\end_inset


\end_layout

\begin_layout Standard
We expect to see some output.
\end_layout

\end_body
\end_document

Reply via email to