1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
6 \use_default_options true
10 \maintain_unincluded_children false
12 \language_package default
18 \font_default_family default
19 \use_non_tex_fonts false
26 \default_output_format default
28 \bibtex_command default
29 \index_command default
30 \paperfontsize default
35 \use_package amsmath 1
37 \use_package mathdots 1
38 \use_package mathtools 0
40 \use_package undertilde 1
42 \cite_engine_type numerical
46 \paperorientation portrait
60 \paragraph_separation indent
61 \paragraph_indentation default
62 \quotes_language english
65 \paperpagestyle default
66 \tracking_changes false
84 \begin_layout Plain Layout
85 Department of Statistics, Iowa State University.
87 \begin_inset CommandInset href
90 target "xie@yihui.name"
103 \begin_layout Standard
105 \begin_inset Flex URL
108 \begin_layout Plain Layout
110 http://www.r-project.org
119 is an alternative tool to Sweave based on a different design with more
121 LyX has native support to Sweave since version 2.0.0, and the support to
126 was also added since 2.0.3.
127 The usage is basically the same as the
135 \begin_layout Plain Layout
136 read the LyX/Sweave manual from
138 Help\SpecialChar \menuseparator
147 \begin_layout Enumerate
148 Open a new LyX document;
151 \begin_layout Enumerate
154 Document\SpecialChar \menuseparator
155 Settings\SpecialChar \menuseparator
158 and insert the module named
165 \begin_layout Enumerate
166 Then insert R code in the document with either
168 Insert\SpecialChar \menuseparator
178 \begin_layout Standard
180 \begin_inset Flex URL
183 \begin_layout Plain Layout
185 http://yihui.github.com/knitr
190 has full documentation and demos of
194 ; many of the examples have links to the LyX source documents.
197 \begin_layout Standard
202 package requires R >= 2.14.1, so you need to update R if you are using an
204 Here we show one chunk as a simple example:
207 \begin_layout Standard
211 \begin_layout Plain Layout
216 \begin_layout Plain Layout
221 \begin_layout Plain Layout
223 df=data.frame(y=rnorm(100), x=1:100)
226 \begin_layout Plain Layout
228 summary(lm(y~x, data=df))
231 \begin_layout Plain Layout
241 \begin_layout Standard
242 Please contact the package author in case of any problems.