#LyX 1.4.3 created this file. For more info see http://www.lyx.org/
\lyxformat 245
\begin_document
\begin_header
\textclass literate-article
\begin_preamble
% Meta information - fill between {} and do not remove %
% \VignetteIndexEntry{An R Package for ...}
% \VignetteDepends{foo, bar, ...}
% \VignetteKeywords{kwd1, kwd2}
% \VignettePackage{...}
\end_preamble
\language english
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
\spacing single
\papersize default
\use_geometry false
\use_amsmath 1
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\end_header

\begin_body

\begin_layout Title
Vignette on 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
Rpackage{foo}
\end_layout

\end_inset

 package
\end_layout

\begin_layout Author
Author
\end_layout

\begin_layout Section
Introduction
\end_layout

\begin_layout Standard
First fill in vignette information in the preamble.
 Just follow 
\family typewriter
Document
\family default
 --> 
\family typewriter
Settings
\family default
 --> 
\family typewriter
LaTeX Preamble
\family default
 menu.
 If needed, define Sweave options for whole file with 
\begin_inset ERT
status collapsed

\begin_layout Standard

%
\backslash
SweaveOpts{}
\end_layout

\end_inset

 - click on a box, fill between {} and do not forget to delete the % character!
 
\end_layout

\begin_layout Standard
Now write proper introduction for the vignette ;)
\end_layout

\begin_layout Section
Some other section
\end_layout

\begin_layout Standard
You can get 
\begin_inset Quotes eld
\end_inset

R code formatting
\begin_inset Quotes erd
\end_inset

 via so called ERT boxes
\family typewriter
 
\family default
i.e.
 follow 
\family typewriter
Insert
\family default
 --> 
\family typewriter
TeX code
\family default
 menu and use standard 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
LaTeX{}
\end_layout

\end_inset

 markup: 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
Rcode{code}
\end_layout

\end_inset

, 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
Robject{object}
\end_layout

\end_inset

, 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
Rcommand{command}
\end_layout

\end_inset

, 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
Rfunction{function}
\end_layout

\end_inset

, 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
Rfunarg{funarg}
\end_layout

\end_inset

, 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
Rclass{class}
\end_layout

\end_inset

, 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
Rpackage{package}
\end_layout

\end_inset

 and 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
Rmethod{method}
\end_layout

\end_inset

.
\end_layout

\begin_layout Standard
Content of the vignette ...
\end_layout

\begin_layout Scrap
<<chunk1>>=
\newline
x <- rnorm(100)
\newline
mean(x)
\newline
@
\end_layout

\begin_layout Standard
some more contents ...
\end_layout

\begin_layout Standard
\begin_inset Float figure
placement H
wide false
sideways false
status open

\begin_layout Scrap
<<chunk2, fig=TRUE>>=
\newline
hist(rnorm(x))
\newline
@
\end_layout

\begin_layout Caption
Figure caption
\end_layout

\end_inset


\end_layout

\begin_layout Standard
some more contents ...
\end_layout

\begin_layout Section
Session information
\end_layout

\begin_layout Standard
R session information:
\end_layout

\begin_layout Scrap
<<sessionInfo, results=tex>>=
\newline
toLatex(sessionInfo())
\newline
@
\end_layout

\end_body
\end_document
