1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
5 \save_transient_properties true
6 \origin /systemlyxdir/examples/
8 \use_default_options true
12 \maintain_unincluded_children false
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_sf_scale 100 100
26 \font_tt_scale 100 100
28 \default_output_format default
30 \bibtex_command default
31 \index_command default
32 \paperfontsize default
37 \use_package amsmath 1
38 \use_package amssymb 1
41 \use_package mathdots 1
42 \use_package mathtools 0
44 \use_package stackrel 0
45 \use_package stmaryrd 0
46 \use_package undertilde 1
48 \cite_engine_type default
52 \paperorientation portrait
66 \paragraph_separation indent
67 \paragraph_indentation default
68 \quotes_language english
71 \paperpagestyle default
72 \tracking_changes false
82 Using knitr with \SpecialChar LyX
91 \begin_layout Plain Layout
92 Department of Statistics, Iowa State University.
94 \begin_inset CommandInset href
97 target "xie@yihui.name"
110 \begin_layout Standard
112 \begin_inset Flex URL
115 \begin_layout Plain Layout
117 http://www.r-project.org
126 is an alternative tool to Sweave based on a different design with more
129 has native support to Sweave since version 2.0.0, and the support to
133 was also added since 2.0.3.
134 The usage is basically the same as the
142 \begin_layout Plain Layout
143 read the \SpecialChar LyX
146 Help\SpecialChar menuseparator
155 \begin_layout Enumerate
156 Open a new \SpecialChar LyX
160 \begin_layout Enumerate
163 Document\SpecialChar menuseparator
164 Settings\SpecialChar menuseparator
167 and insert the module named
174 \begin_layout Enumerate
175 Then insert R code in the document with either
177 Insert\SpecialChar menuseparator
188 \begin_layout Standard
190 \begin_inset Flex URL
193 \begin_layout Plain Layout
195 http://yihui.name/knitr
200 has full documentation and demos of
204 ; many of the examples have links to the \SpecialChar LyX
208 \begin_layout Standard
213 package requires R >= 2.14.1, so you need to update R if you are using an
215 Here we show one chunk as a simple example:
218 \begin_layout Standard
222 \begin_layout Plain Layout
227 \begin_layout Plain Layout
232 \begin_layout Plain Layout
234 df=data.frame(y=rnorm(100), x=1:100)
237 \begin_layout Plain Layout
239 summary(lm(y~x, data=df))
242 \begin_layout Plain Layout
252 \begin_layout Standard
253 Please contact the package author in case of any problems.