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
19 \font_default_family default
20 \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
36 \use_package amssymb 1
39 \use_package mathdots 1
40 \use_package mathtools 0
42 \use_package stackrel 0
43 \use_package stmaryrd 0
44 \use_package undertilde 1
46 \cite_engine_type default
50 \paperorientation portrait
64 \paragraph_separation indent
65 \paragraph_indentation default
66 \quotes_language english
69 \paperpagestyle default
70 \tracking_changes false
88 \begin_layout Plain Layout
89 Department of Statistics, Iowa State University.
91 \begin_inset CommandInset href
94 target "xie@yihui.name"
107 \begin_layout Standard
109 \begin_inset Flex URL
112 \begin_layout Plain Layout
114 http://www.r-project.org
123 is an alternative tool to Sweave based on a different design with more
125 LyX has native support to Sweave since version 2.0.0, and the support to
130 was also added since 2.0.3.
131 The usage is basically the same as the
139 \begin_layout Plain Layout
140 read the LyX/Sweave manual from
142 Help\SpecialChar \menuseparator
151 \begin_layout Enumerate
152 Open a new LyX document;
155 \begin_layout Enumerate
158 Document\SpecialChar \menuseparator
159 Settings\SpecialChar \menuseparator
162 and insert the module named
169 \begin_layout Enumerate
170 Then insert R code in the document with either
172 Insert\SpecialChar \menuseparator
182 \begin_layout Standard
184 \begin_inset Flex URL
187 \begin_layout Plain Layout
189 http://yihui.name/knitr
194 has full documentation and demos of
198 ; many of the examples have links to the LyX source documents.
201 \begin_layout Standard
206 package requires R >= 2.14.1, so you need to update R if you are using an
208 Here we show one chunk as a simple example:
211 \begin_layout Standard
215 \begin_layout Plain Layout
220 \begin_layout Plain Layout
225 \begin_layout Plain Layout
227 df=data.frame(y=rnorm(100), x=1:100)
230 \begin_layout Plain Layout
232 summary(lm(y~x, data=df))
235 \begin_layout Plain Layout
245 \begin_layout Standard
246 Please contact the package author in case of any problems.