1 #LyX 2.4 created this file. For more info see https://www.lyx.org/
5 \save_transient_properties true
6 \origin /systemlyxdir/examples/Modules/
8 \use_default_options true
12 \maintain_unincluded_children no
14 \language_package default
17 \font_roman "palatino" "default"
18 \font_sans "lmss" "default"
19 \font_typewriter "lmtt" "default"
20 \font_math "auto" "auto"
21 \font_default_family default
22 \use_non_tex_fonts false
25 \font_typewriter_osf false
27 \font_sf_scale 100 100
28 \font_tt_scale 100 100
30 \use_dash_ligatures false
32 \default_output_format default
34 \bibtex_command default
35 \index_command default
36 \paperfontsize default
41 \use_package amsmath 1
42 \use_package amssymb 1
45 \use_package mathdots 1
46 \use_package mathtools 1
48 \use_package stackrel 1
49 \use_package stmaryrd 1
50 \use_package undertilde 1
52 \cite_engine_type default
56 \paperorientation portrait
72 \paragraph_separation indent
73 \paragraph_indentation default
75 \math_numbering_side default
80 \paperpagestyle default
81 \tracking_changes false
82 \postpone_fragile_content false
92 Using knitr with \SpecialChar LyX
101 \begin_layout Plain Layout
102 Department of Statistics, Iowa State University.
104 \begin_inset CommandInset href
106 name "xie@yihui.name"
107 target "xie@yihui.name"
121 \begin_layout Standard
123 \begin_inset Flex URL
126 \begin_layout Plain Layout
128 http://www.r-project.org
137 is an alternative tool to Sweave based on a different design with more
140 has native support to Sweave since version 2.0.0, and the support to
144 was also added since 2.0.3.
145 The usage is basically the same as the
153 \begin_layout Plain Layout
154 read the \SpecialChar LyX
157 Help\SpecialChar menuseparator
166 \begin_layout Enumerate
167 Open a new \SpecialChar LyX
171 \begin_layout Enumerate
174 Document\SpecialChar menuseparator
175 Settings\SpecialChar menuseparator
178 and insert the module named
185 \begin_layout Enumerate
186 Then insert R code in the document with either
188 Insert\SpecialChar menuseparator
199 \begin_layout Standard
201 \begin_inset Flex URL
204 \begin_layout Plain Layout
206 http://yihui.name/knitr
211 has full documentation and demos of
215 ; many of the examples have links to the \SpecialChar LyX
219 \begin_layout Standard
220 Since \SpecialChar LyX
221 2.3, it is necessary to enable the use of
227 Preferences\SpecialChar menuseparator
228 File Handling\SpecialChar menuseparator
231 in order to compile with
238 \begin_layout Standard
243 package requires R >= 2.14.1, so you need to update R if you are using an
245 Here we show one chunk as a simple example:
248 \begin_layout Standard
249 \begin_inset Flex Chunk
252 \begin_layout Plain Layout
254 \begin_inset Argument 1
257 \begin_layout Plain Layout
267 \begin_layout Plain Layout
272 \begin_layout Plain Layout
274 df=data.frame(y=rnorm(100), x=1:100)
277 \begin_layout Plain Layout
279 summary(lm(y~x, data=df))
287 \begin_layout Standard
288 Please contact the package author in case of any problems.