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
26 \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
82 \tracking_changes false
85 \postpone_fragile_content false
89 \docbook_table_output 0
90 \docbook_mathml_prefix 1
96 Using knitr with \SpecialChar LyX
105 \begin_layout Plain Layout
106 Department of Statistics,
107 Iowa State University.
110 \begin_inset CommandInset href
112 name "xie@yihui.name"
113 target "xie@yihui.name"
127 \begin_layout Standard
129 \begin_inset Flex URL
132 \begin_layout Plain Layout
134 http://www.r-project.org
143 is an alternative tool to Sweave based on a different design with more features.
145 has native support to Sweave since version 2.0.0,
150 was also added since 2.0.3.
151 The usage is basically the same as the
159 \begin_layout Plain Layout
160 read the \SpecialChar LyX
163 Help\SpecialChar menuseparator
172 \begin_layout Enumerate
173 Open a new \SpecialChar LyX
177 \begin_layout Enumerate
180 Document\SpecialChar menuseparator
181 Settings\SpecialChar menuseparator
184 and insert the module named
191 \begin_layout Enumerate
192 Then insert R code in the document with either
194 Insert\SpecialChar menuseparator
205 \begin_layout Standard
207 \begin_inset Flex URL
210 \begin_layout Plain Layout
212 http://yihui.name/knitr
217 has full documentation and demos of
222 many of the examples have links to the \SpecialChar LyX
226 \begin_layout Standard
227 Since \SpecialChar LyX
229 it is necessary to enable the use of
235 Preferences\SpecialChar menuseparator
236 File Handling\SpecialChar menuseparator
239 in order to compile with
246 \begin_layout Standard
251 package requires R >= 2.14.1,
252 so you need to update R if you are using an old version of R.
253 Here we show one chunk as a simple example:
256 \begin_layout Standard
257 \begin_inset Flex Chunk
260 \begin_layout Plain Layout
262 \begin_inset Argument 1
265 \begin_layout Plain Layout
275 \begin_layout Plain Layout
280 \begin_layout Plain Layout
282 df=data.frame(y=rnorm(100),
286 \begin_layout Plain Layout
297 \begin_layout Standard
298 Please contact the package author in case of any problems.