1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
5 \origin /systemlyxdir/examples/
7 \use_default_options true
11 \maintain_unincluded_children false
13 \language_package default
16 \font_roman "palatino" "default"
17 \font_sans "lmss" "default"
18 \font_typewriter "lmtt" "default"
19 \font_math "auto" "auto"
20 \font_default_family default
21 \use_non_tex_fonts false
24 \font_sf_scale 100 100
25 \font_tt_scale 100 100
27 \default_output_format default
29 \bibtex_command default
30 \index_command default
31 \paperfontsize default
36 \use_package amsmath 1
37 \use_package amssymb 1
40 \use_package mathdots 1
41 \use_package mathtools 0
43 \use_package stackrel 0
44 \use_package stmaryrd 0
45 \use_package undertilde 1
47 \cite_engine_type default
51 \paperorientation portrait
65 \paragraph_separation indent
66 \paragraph_indentation default
67 \quotes_language english
70 \paperpagestyle default
71 \tracking_changes false
81 Using knitr with \SpecialCharNoPassThru LyX
89 \begin_layout Plain Layout
90 Department of Statistics, Iowa State University.
92 \begin_inset CommandInset href
95 target "xie@yihui.name"
108 \begin_layout Standard
110 \begin_inset Flex URL
113 \begin_layout Plain Layout
115 http://www.r-project.org
124 is an alternative tool to Sweave based on a different design with more
126 \SpecialCharNoPassThru LyX
127 has native support to Sweave since version 2.0.0, and the support to
132 was also added since 2.0.3.
133 The usage is basically the same as the
141 \begin_layout Plain Layout
142 read the \SpecialCharNoPassThru LyX
145 Help\SpecialChar menuseparator
154 \begin_layout Enumerate
155 Open a new \SpecialCharNoPassThru LyX
159 \begin_layout Enumerate
162 Document\SpecialChar menuseparator
163 Settings\SpecialChar menuseparator
166 and insert the module named
173 \begin_layout Enumerate
174 Then insert R code in the document with either
176 Insert\SpecialChar menuseparator
177 \SpecialCharNoPassThru TeX
187 \begin_layout Standard
189 \begin_inset Flex URL
192 \begin_layout Plain Layout
194 http://yihui.name/knitr
199 has full documentation and demos of
203 ; many of the examples have links to the \SpecialCharNoPassThru LyX
207 \begin_layout Standard
212 package requires R >= 2.14.1, so you need to update R if you are using an
214 Here we show one chunk as a simple example:
217 \begin_layout Standard
221 \begin_layout Plain Layout
226 \begin_layout Plain Layout
231 \begin_layout Plain Layout
233 df=data.frame(y=rnorm(100), x=1:100)
236 \begin_layout Plain Layout
238 summary(lm(y~x, data=df))
241 \begin_layout Plain Layout
251 \begin_layout Standard
252 Please contact the package author in case of any problems.