Trying to write a project overview at top of rorg.org

This commit is contained in:
Dan Davison 2009-02-08 13:11:22 -05:00
parent bdae433d69
commit cf31c1f134
13 changed files with 1662 additions and 1 deletions

View File

@ -0,0 +1,252 @@
%PDF-1.1
%<25>â<EFBFBD>ã<EFBFBD>Ï<EFBFBD>Ó\r
1 0 obj
<<
/CreationDate (D:20090208111729)
/ModDate (D:20090208111729)
/Title (R Graphics Output)
/Producer (R 2.7.2)
/Creator (R)
>>
endobj
2 0 obj
<<
/Type /Catalog
/Pages 3 0 R
>>
endobj
5 0 obj
<<
/Type /Font
/Subtype /Type1
/Name /F1
/BaseFont /ZapfDingbats
>>
endobj
6 0 obj
<<
/Type /Page
/Parent 3 0 R
/Contents 7 0 R
/Resources 4 0 R
>>
endobj
7 0 obj
<<
/Length 8 0 R
>>
stream
q
Q q -216.00 -216.00 864.00 864.00 re W n
Q q -216.00 -216.00 864.00 864.00 re W n
BT
0.000 0.000 0.000 rg
/F2 1 Tf 12.00 0.00 -0.00 12.00 219.53 18.00 Tm (dist) Tj
ET
Q q -216.00 -216.00 864.00 864.00 re W n
BT
0.000 0.000 0.000 rg
/F2 1 Tf 0.00 12.00 -12.00 0.00 20.62 210.55 Tm (speed) Tj
ET
Q q -216.00 -216.00 864.00 864.00 re W n
Q q -216.00 -216.00 864.00 864.00 re W n
0.000 0.000 0.000 RG
0.75 w
[] 0 d
1 J
1 j
10.00 M
70.95 396.99 m 70.95 402.66 l S
122.73 396.99 m 122.73 402.66 l S
174.50 396.99 m 174.50 402.66 l S
226.28 396.99 m 226.28 402.66 l S
278.06 396.99 m 278.06 402.66 l S
329.83 396.99 m 329.83 402.66 l S
381.61 396.99 m 381.61 402.66 l S
Q q -216.00 -216.00 864.00 864.00 re W n
Q q -216.00 -216.00 864.00 864.00 re W n
0.000 0.000 0.000 RG
0.75 w
[] 0 d
1 J
1 j
10.00 M
54.74 91.90 m 49.07 91.90 l S
54.74 162.95 m 49.07 162.95 l S
54.74 234.00 m 49.07 234.00 l S
54.74 305.05 m 49.07 305.05 l S
54.74 376.10 m 49.07 376.10 l S
BT
0.000 0.000 0.000 rg
/F2 1 Tf 10.00 0.00 -0.00 10.00 37.85 88.31 Tm (5) Tj
/F2 1 Tf 10.00 0.00 -0.00 10.00 32.29 159.36 Tm (10) Tj
/F2 1 Tf 10.00 0.00 -0.00 10.00 32.29 230.41 Tm (15) Tj
/F2 1 Tf 10.00 0.00 -0.00 10.00 32.29 301.46 Tm (20) Tj
/F2 1 Tf 10.00 0.00 -0.00 10.00 32.29 372.51 Tm (25) Tj
ET
Q q -216.00 -216.00 864.00 864.00 re W n
Q q -216.00 -216.00 864.00 864.00 re W n
0.000 0.000 0.000 RG
0.75 w
[] 0 d
1 J
1 j
10.00 M
70.95 56.80 m 70.95 51.13 l S
122.73 56.80 m 122.73 51.13 l S
174.50 56.80 m 174.50 51.13 l S
226.28 56.80 m 226.28 51.13 l S
278.06 56.80 m 278.06 51.13 l S
329.83 56.80 m 329.83 51.13 l S
381.61 56.80 m 381.61 51.13 l S
BT
0.000 0.000 0.000 rg
/F2 1 Tf 10.00 0.00 -0.00 10.00 68.17 38.29 Tm (0) Tj
/F2 1 Tf 10.00 0.00 -0.00 10.00 117.17 38.29 Tm (20) Tj
/F2 1 Tf 10.00 0.00 -0.00 10.00 168.94 38.29 Tm (40) Tj
/F2 1 Tf 10.00 0.00 -0.00 10.00 220.72 38.29 Tm (60) Tj
/F2 1 Tf 10.00 0.00 -0.00 10.00 272.50 38.29 Tm (80) Tj
/F2 1 Tf 10.00 0.00 -0.00 10.00 321.49 38.29 Tm (100) Tj
/F2 1 Tf 10.00 0.00 -0.00 10.00 373.27 38.29 Tm (120) Tj
ET
402.99 91.90 m 408.66 91.90 l S
402.99 162.95 m 408.66 162.95 l S
402.99 234.00 m 408.66 234.00 l S
402.99 305.05 m 408.66 305.05 l S
402.99 376.10 m 408.66 376.10 l S
Q q -216.00 -216.00 864.00 864.00 re W n
Q q 54.74 56.80 348.25 340.19 re W n
0.000 0.502 1.000 RG
0.75 w
[] 0 d
1 J
1 j
10.00 M
BT
/F1 1 Tf 1 Tr 6.65 0 0 6.65 73.49 75.39 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 94.21 75.39 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 78.67 118.02 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 125.27 118.02 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 109.74 132.23 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 94.21 146.44 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 114.92 160.65 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 135.63 160.65 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 156.34 160.65 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 112.33 174.86 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 140.80 174.86 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 104.56 189.07 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 120.09 189.07 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 130.45 189.07 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 140.80 189.07 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 135.63 203.28 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 156.34 203.28 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 156.34 203.28 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 187.40 203.28 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 135.63 217.49 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 161.51 217.49 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 223.65 217.49 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 275.42 217.49 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 120.09 231.70 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 135.63 231.70 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 208.11 231.70 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 151.16 245.91 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 171.87 245.91 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 151.16 260.12 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 171.87 260.12 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 197.76 260.12 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 177.05 274.33 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 213.29 274.33 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 265.07 274.33 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 285.78 274.33 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 161.51 288.54 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 187.40 288.54 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 244.36 288.54 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 151.16 302.75 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 192.58 302.75 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 202.94 302.75 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 213.29 302.75 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 234.00 302.75 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 239.18 331.17 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 208.11 345.38 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 249.53 359.59 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 306.49 359.59 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 309.08 359.59 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 378.98 359.59 Tm (l) Tj 0 Tr
/F1 1 Tf 1 Tr 6.65 0 0 6.65 288.37 373.80 Tm (l) Tj 0 Tr
0.000 0.000 0.000 RG
ET
54.74 63.48 m 402.99 63.48 l S
86.48 56.80 m 86.48 396.99 l S
Q q -216.00 -216.00 864.00 864.00 re W n
Q q -216.00 -216.00 864.00 864.00 re W n
0.000 0.000 0.000 RG
0.75 w
[] 0 d
1 J
1 j
10.00 M
54.74 56.80 348.25 340.19 re S
Q q -216.00 -216.00 864.00 864.00 re W n
Q q -216.00 -216.00 864.00 864.00 re W n
Q q -216.00 -216.00 864.00 864.00 re W n
Q
endstream
endobj
8 0 obj
5554
endobj
3 0 obj
<<
/Type /Pages
/Kids [
6 0 R
]
/Count 1
/MediaBox [0 0 432 432]
>>
endobj
4 0 obj
<<
/ProcSet [/PDF /Text]
/Font << /F1 5 0 R /F2 10 0 R >>
/ExtGState << >>
>>
endobj
9 0 obj
<<
/Type /Encoding
/BaseEncoding /WinAnsiEncoding
/Differences [ 45/minus 96/quoteleft
144/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent
/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space]
>>
endobj
10 0 obj <<
/Type /Font
/Subtype /Type1
/Name /F2
/BaseFont /Helvetica
/Encoding 9 0 R
>> endobj
xref
0 11
0000000000 65535 f
0000000021 00000 n
0000000163 00000 n
0000006002 00000 n
0000006085 00000 n
0000000212 00000 n
0000000295 00000 n
0000000375 00000 n
0000005982 00000 n
0000006178 00000 n
0000006435 00000 n
trailer
<<
/Size 11
/Info 1 0 R
/Root 2 0 R
>>
startxref
6532
%%EOF

View File

@ -64,6 +64,7 @@
#+CAPTION: speed by distance
#+LABEL: fig:speed_by_distance
#+BEGIN_R fig=TRUE, eps=FALSE, pdf=TRUE
require(lattice)
print(xyplot(speed ~ dist, cars,
panel = function (x, y, ...) {
panel.xyplot(x, y, ...)

View File

@ -0,0 +1,73 @@
# -*- mode: org -*-
#+OPTIONS: LaTeX:t
* Sweave and org-mode
If you're reading a PDF version of this document, you should also
look at [[file:testing.Rorg][testing.Rorg]] (the source file) and [[file:testing.org][testing.org]] (the output
of the Sweave process).
Keep in mind that one of the advantages of a block-based approach is
using \texttt{C-'} to edit code in its native mode.
** Use the Sweave package for latex formatting
Org allows us to issue commands to be included in \{LaTeX} export.
#+LATEX_HEADER: \usepackage{Sweave}
** R blocks
The first argument to an R block when using Sweave is the label for
that block.
Not all R blocks are printed. Sweave options allow the printing of
the evaluated code, the output of the code, both, or neither.
*** R code that is not printed
#+BEGIN_R: hidden_block, echo=FALSE, results=HIDE
a <- 3
b <- 6
#+END_R
*** R code that is printed
#+BEGIN_R: visible_block
c <- 4
#+END_R
We can use block labels to embed blocks by reference (even if they
weren't printed before).
*** R code that references other blocks
#+BEGIN_R: combined_block
#+R_CODEREF: hidden_block
#+R_CODEREF: visible_block
a + b +c
#+END_R
** Inline references to R data
We can evaluate R code inline.
*** Used in text
The value of =a= is \R{a}.
*** Used in a table
| a | b | c | TOTAL |
|-------+-------+-------+---------------|
| \R{a} | \R{b} | \R{c} | \R{a + b + c} |
** Single-line R commands
If we want a line of R code to be evaluated but not printed,
there's a convenient shorthand. This only works for single lines
of R code, but you can have more than one in a row.
#+R: library(lattice)
#+R: data(cars)
** Graphics
We use values defined elsewhere in the buffer to produce this
graph. The new CAPTION and LABEL arguments work just fine.
#+CAPTION: speed by distance
#+LABEL: fig:speed_by_distance
#+BEGIN_R fig=TRUE, eps=FALSE, pdf=TRUE
print(xyplot(speed ~ dist, cars,
panel = function (x, y, ...) {
panel.xyplot(x, y, ...)
panel.abline(h=a)
panel.abline(v=b)
}))
#+END_R

View File

@ -0,0 +1,25 @@
\relax
\ifx\hyper@anchor\@undefined
\global \let \oldcontentsline\contentsline
\gdef \contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}}
\global \let \oldnewlabel\newlabel
\gdef \newlabel#1#2{\newlabelxx{#1}#2}
\gdef \newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}}
\AtEndDocument{\let \contentsline\oldcontentsline
\let \newlabel\oldnewlabel}
\else
\global \let \hyper@last\relax
\fi
\@writefile{toc}{\contentsline {section}{\numberline {1}Sweave and org-mode}{1}{section.1}}
\newlabel{sec-1}{{1}{1}{Sweave and org-mode\relax }{section.1}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}R code that is not printed}{1}{subsection.1.1}}
\newlabel{sec-1.3}{{1.1}{1}{R code that is not printed\relax }{subsection.1.1}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}R code that is printed}{1}{subsection.1.2}}
\newlabel{sec-1.4}{{1.2}{1}{R code that is printed\relax }{subsection.1.2}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}R code that references other blocks}{1}{subsection.1.3}}
\newlabel{sec-1.5}{{1.3}{1}{R code that references other blocks\relax }{subsection.1.3}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.4}Used in text}{2}{subsection.1.4}}
\newlabel{sec-1.7}{{1.4}{2}{Used in text\relax }{subsection.1.4}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.5}Used in a table}{2}{subsection.1.5}}
\newlabel{sec-1.8}{{1.5}{2}{Used in a table\relax }{subsection.1.5}{}}

View File

@ -0,0 +1,612 @@
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) (format=pdflatex 2008.10.27) 8 FEB 2009 11:19
entering extended mode
%&-line parsing enabled.
**testing.tex
(./testing.tex
LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, croatian, ukrainian, russian, bulgarian, czech, slovak, danish, dut
ch, finnish, basque, french, german, ngerman, ibycus, greek, monogreek, ancient
greek, hungarian, italian, latin, mongolian, norsk, icelandic, interlingua, tur
kish, coptic, romanian, welsh, serbian, slovenian, estonian, esperanto, upperso
rbian, indonesian, polish, portuguese, spanish, catalan, galician, swedish, loa
ded.
(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size11.clo
File: size11.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texmf-texlive/tex/latex/base/inputenc.sty
Package: inputenc 2006/05/05 v1.1b Input encoding file
\inpenc@prehook=\toks14
\inpenc@posthook=\toks15
(/usr/share/texmf-texlive/tex/latex/base/utf8.def
File: utf8.def 2006/03/30 v1.1i UTF-8 support for inputenc
Now handling font encoding OML ...
... no UTF-8 mapping file for font encoding OML
Now handling font encoding T1 ...
... processing UTF-8 mapping file for font encodingT1
(/usr/share/texmf-texlive/tex/latex/base/t1enc.dfu
File: t1enc.dfu 2006/03/30 v1.1i UTF-8 support for inputenc
defining Unicode char U+00A1 (decimal 161)
defining Unicode char U+00A3 (decimal 163)
defining Unicode char U+00AB (decimal 171)
defining Unicode char U+00BB (decimal 187)
defining Unicode char U+00BF (decimal 191)
defining Unicode char U+00C0 (decimal 192)
defining Unicode char U+00C1 (decimal 193)
defining Unicode char U+00C2 (decimal 194)
defining Unicode char U+00C3 (decimal 195)
defining Unicode char U+00C4 (decimal 196)
defining Unicode char U+00C5 (decimal 197)
defining Unicode char U+00C6 (decimal 198)
defining Unicode char U+00C7 (decimal 199)
defining Unicode char U+00C8 (decimal 200)
defining Unicode char U+00C9 (decimal 201)
defining Unicode char U+00CA (decimal 202)
defining Unicode char U+00CB (decimal 203)
defining Unicode char U+00CC (decimal 204)
defining Unicode char U+00CD (decimal 205)
defining Unicode char U+00CE (decimal 206)
defining Unicode char U+00CF (decimal 207)
defining Unicode char U+00D0 (decimal 208)
defining Unicode char U+00D1 (decimal 209)
defining Unicode char U+00D2 (decimal 210)
defining Unicode char U+00D3 (decimal 211)
defining Unicode char U+00D4 (decimal 212)
defining Unicode char U+00D5 (decimal 213)
defining Unicode char U+00D6 (decimal 214)
defining Unicode char U+00D8 (decimal 216)
defining Unicode char U+00D9 (decimal 217)
defining Unicode char U+00DA (decimal 218)
defining Unicode char U+00DB (decimal 219)
defining Unicode char U+00DC (decimal 220)
defining Unicode char U+00DD (decimal 221)
defining Unicode char U+00DE (decimal 222)
defining Unicode char U+00DF (decimal 223)
defining Unicode char U+00E0 (decimal 224)
defining Unicode char U+00E1 (decimal 225)
defining Unicode char U+00E2 (decimal 226)
defining Unicode char U+00E3 (decimal 227)
defining Unicode char U+00E4 (decimal 228)
defining Unicode char U+00E5 (decimal 229)
defining Unicode char U+00E6 (decimal 230)
defining Unicode char U+00E7 (decimal 231)
defining Unicode char U+00E8 (decimal 232)
defining Unicode char U+00E9 (decimal 233)
defining Unicode char U+00EA (decimal 234)
defining Unicode char U+00EB (decimal 235)
defining Unicode char U+00EC (decimal 236)
defining Unicode char U+00ED (decimal 237)
defining Unicode char U+00EE (decimal 238)
defining Unicode char U+00EF (decimal 239)
defining Unicode char U+00F0 (decimal 240)
defining Unicode char U+00F1 (decimal 241)
defining Unicode char U+00F2 (decimal 242)
defining Unicode char U+00F3 (decimal 243)
defining Unicode char U+00F4 (decimal 244)
defining Unicode char U+00F5 (decimal 245)
defining Unicode char U+00F6 (decimal 246)
defining Unicode char U+00F8 (decimal 248)
defining Unicode char U+00F9 (decimal 249)
defining Unicode char U+00FA (decimal 250)
defining Unicode char U+00FB (decimal 251)
defining Unicode char U+00FC (decimal 252)
defining Unicode char U+00FD (decimal 253)
defining Unicode char U+00FE (decimal 254)
defining Unicode char U+00FF (decimal 255)
defining Unicode char U+0102 (decimal 258)
defining Unicode char U+0103 (decimal 259)
defining Unicode char U+0104 (decimal 260)
defining Unicode char U+0105 (decimal 261)
defining Unicode char U+0106 (decimal 262)
defining Unicode char U+0107 (decimal 263)
defining Unicode char U+010C (decimal 268)
defining Unicode char U+010D (decimal 269)
defining Unicode char U+010E (decimal 270)
defining Unicode char U+010F (decimal 271)
defining Unicode char U+0110 (decimal 272)
defining Unicode char U+0111 (decimal 273)
defining Unicode char U+0118 (decimal 280)
defining Unicode char U+0119 (decimal 281)
defining Unicode char U+011A (decimal 282)
defining Unicode char U+011B (decimal 283)
defining Unicode char U+011E (decimal 286)
defining Unicode char U+011F (decimal 287)
defining Unicode char U+0130 (decimal 304)
defining Unicode char U+0131 (decimal 305)
defining Unicode char U+0132 (decimal 306)
defining Unicode char U+0133 (decimal 307)
defining Unicode char U+0139 (decimal 313)
defining Unicode char U+013A (decimal 314)
defining Unicode char U+013D (decimal 317)
defining Unicode char U+013E (decimal 318)
defining Unicode char U+0141 (decimal 321)
defining Unicode char U+0142 (decimal 322)
defining Unicode char U+0143 (decimal 323)
defining Unicode char U+0144 (decimal 324)
defining Unicode char U+0147 (decimal 327)
defining Unicode char U+0148 (decimal 328)
defining Unicode char U+014A (decimal 330)
defining Unicode char U+014B (decimal 331)
defining Unicode char U+0150 (decimal 336)
defining Unicode char U+0151 (decimal 337)
defining Unicode char U+0152 (decimal 338)
defining Unicode char U+0153 (decimal 339)
defining Unicode char U+0154 (decimal 340)
defining Unicode char U+0155 (decimal 341)
defining Unicode char U+0158 (decimal 344)
defining Unicode char U+0159 (decimal 345)
defining Unicode char U+015A (decimal 346)
defining Unicode char U+015B (decimal 347)
defining Unicode char U+015E (decimal 350)
defining Unicode char U+015F (decimal 351)
defining Unicode char U+0160 (decimal 352)
defining Unicode char U+0161 (decimal 353)
defining Unicode char U+0162 (decimal 354)
defining Unicode char U+0163 (decimal 355)
defining Unicode char U+0164 (decimal 356)
defining Unicode char U+0165 (decimal 357)
defining Unicode char U+016E (decimal 366)
defining Unicode char U+016F (decimal 367)
defining Unicode char U+0170 (decimal 368)
defining Unicode char U+0171 (decimal 369)
defining Unicode char U+0178 (decimal 376)
defining Unicode char U+0179 (decimal 377)
defining Unicode char U+017A (decimal 378)
defining Unicode char U+017B (decimal 379)
defining Unicode char U+017C (decimal 380)
defining Unicode char U+017D (decimal 381)
defining Unicode char U+017E (decimal 382)
defining Unicode char U+200C (decimal 8204)
defining Unicode char U+2013 (decimal 8211)
defining Unicode char U+2014 (decimal 8212)
defining Unicode char U+2018 (decimal 8216)
defining Unicode char U+2019 (decimal 8217)
defining Unicode char U+201A (decimal 8218)
defining Unicode char U+201C (decimal 8220)
defining Unicode char U+201D (decimal 8221)
defining Unicode char U+201E (decimal 8222)
defining Unicode char U+2030 (decimal 8240)
defining Unicode char U+2031 (decimal 8241)
defining Unicode char U+2039 (decimal 8249)
defining Unicode char U+203A (decimal 8250)
defining Unicode char U+2423 (decimal 9251)
)
Now handling font encoding OT1 ...
... processing UTF-8 mapping file for font encodingOT1
(/usr/share/texmf-texlive/tex/latex/base/ot1enc.dfu
File: ot1enc.dfu 2006/03/30 v1.1i UTF-8 support for inputenc
defining Unicode char U+00A1 (decimal 161)
defining Unicode char U+00A3 (decimal 163)
defining Unicode char U+00B8 (decimal 184)
defining Unicode char U+00BF (decimal 191)
defining Unicode char U+00C5 (decimal 197)
defining Unicode char U+00C6 (decimal 198)
defining Unicode char U+00D8 (decimal 216)
defining Unicode char U+00DF (decimal 223)
defining Unicode char U+00E6 (decimal 230)
defining Unicode char U+00EC (decimal 236)
defining Unicode char U+00ED (decimal 237)
defining Unicode char U+00EE (decimal 238)
defining Unicode char U+00EF (decimal 239)
defining Unicode char U+00F8 (decimal 248)
defining Unicode char U+0131 (decimal 305)
defining Unicode char U+0141 (decimal 321)
defining Unicode char U+0142 (decimal 322)
defining Unicode char U+0152 (decimal 338)
defining Unicode char U+0153 (decimal 339)
defining Unicode char U+2013 (decimal 8211)
defining Unicode char U+2014 (decimal 8212)
defining Unicode char U+2018 (decimal 8216)
defining Unicode char U+2019 (decimal 8217)
defining Unicode char U+201C (decimal 8220)
defining Unicode char U+201D (decimal 8221)
)
Now handling font encoding OMS ...
... processing UTF-8 mapping file for font encodingOMS
(/usr/share/texmf-texlive/tex/latex/base/omsenc.dfu
File: omsenc.dfu 2006/03/30 v1.1i UTF-8 support for inputenc
defining Unicode char U+00A7 (decimal 167)
defining Unicode char U+00B6 (decimal 182)
defining Unicode char U+00B7 (decimal 183)
defining Unicode char U+2020 (decimal 8224)
defining Unicode char U+2021 (decimal 8225)
defining Unicode char U+2022 (decimal 8226)
)
Now handling font encoding OMX ...
... no UTF-8 mapping file for font encoding OMX
Now handling font encoding U ...
... no UTF-8 mapping file for font encoding U
defining Unicode char U+00A9 (decimal 169)
defining Unicode char U+00AA (decimal 170)
defining Unicode char U+00AE (decimal 174)
defining Unicode char U+00BA (decimal 186)
defining Unicode char U+02C6 (decimal 710)
defining Unicode char U+02DC (decimal 732)
defining Unicode char U+200C (decimal 8204)
defining Unicode char U+2026 (decimal 8230)
defining Unicode char U+2122 (decimal 8482)
defining Unicode char U+2423 (decimal 9251)
))
(/usr/share/texmf-texlive/tex/latex/base/fontenc.sty
Package: fontenc 2005/09/27 v1.99g Standard LaTeX package
(/usr/share/texmf-texlive/tex/latex/base/t1enc.def
File: t1enc.def 2005/09/27 v1.99g Standard LaTeX file
LaTeX Font Info: Redeclaring font encoding T1 on input line 43.
))
(/usr/share/texmf-texlive/tex/latex/graphics/graphicx.sty
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks16
)
(/usr/share/texmf-texlive/tex/latex/graphics/graphics.sty
Package: graphics 2006/02/20 v1.0o Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texmf-texlive/tex/latex/graphics/trig.sty
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
)
(/etc/texmf/tex/latex/config/graphics.cfg
File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
)
Package graphics Info: Driver file: pdftex.def on input line 90.
(/usr/share/texmf-texlive/tex/latex/pdftex-def/pdftex.def
File: pdftex.def 2007/01/08 v0.04d Graphics/color for pdfTeX
\Gread@gobject=\count87
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
(/usr/share/texmf-texlive/tex/latex/tools/longtable.sty
Package: longtable 2004/02/01 v4.11 Multi-page Table package (DPC)
\LTleft=\skip43
\LTright=\skip44
\LTpre=\skip45
\LTpost=\skip46
\LTchunksize=\count88
\LTcapwidth=\dimen105
\LT@head=\box26
\LT@firsthead=\box27
\LT@foot=\box28
\LT@lastfoot=\box29
\LT@cols=\count89
\LT@rows=\count90
\c@LT@tables=\count91
\c@LT@chunks=\count92
\LT@p@ftn=\toks17
)
(/usr/share/texmf-texlive/tex/latex/hyperref/hyperref.sty
Package: hyperref 2007/02/07 v6.75r Hypertext links for LaTeX
\@linkdim=\dimen106
\Hy@linkcounter=\count93
\Hy@pagecounter=\count94
(/usr/share/texmf-texlive/tex/latex/hyperref/pd1enc.def
File: pd1enc.def 2007/02/07 v6.75r Hyperref: PDFDocEncoding definition (HO)
Now handling font encoding PD1 ...
... no UTF-8 mapping file for font encoding PD1
)
(/etc/texmf/tex/latex/config/hyperref.cfg
File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
)
(/usr/share/texmf-texlive/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2006/08/22 v2.4 Connects package keyval with LaTeX options (
HO)
)
Package hyperref Info: Hyper figures OFF on input line 2288.
Package hyperref Info: Link nesting OFF on input line 2293.
Package hyperref Info: Hyper index ON on input line 2296.
Package hyperref Info: Plain pages OFF on input line 2303.
Package hyperref Info: Backreferencing OFF on input line 2308.
Implicit mode ON; LaTeX internals redefined
Package hyperref Info: Bookmarks ON on input line 2444.
(/usr/share/texmf-texlive/tex/latex/ltxmisc/url.sty
\Urlmuskip=\muskip10
Package: url 2005/06/27 ver 3.2 Verb mode for urls, etc.
)
LaTeX Info: Redefining \url on input line 2599.
\Fld@menulength=\count95
\Field@Width=\dimen107
\Fld@charsize=\dimen108
\Choice@toks=\toks18
\Field@toks=\toks19
Package hyperref Info: Hyper figures OFF on input line 3102.
Package hyperref Info: Link nesting OFF on input line 3107.
Package hyperref Info: Hyper index ON on input line 3110.
Package hyperref Info: backreferencing OFF on input line 3117.
Package hyperref Info: Link coloring OFF on input line 3122.
\Hy@abspage=\count96
\c@Item=\count97
\c@Hfootnote=\count98
)
*hyperref using default driver hpdftex*
(/usr/share/texmf-texlive/tex/latex/hyperref/hpdftex.def
File: hpdftex.def 2007/02/07 v6.75r Hyperref driver for pdfTeX
\Fld@listcount=\count99
)
(/usr/share/texmf/tex/latex/R/Sweave.sty
Package: Sweave
(/usr/share/texmf-texlive/tex/latex/base/ifthen.sty
Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
)
(/usr/share/texmf-texlive/tex/latex/fancyvrb/fancyvrb.sty
Package: fancyvrb 1998/07/17
Style option: `fancyvrb' v2.6, with DG/SPQR fixes <1998/07/17> (tvz)
\FV@CodeLineNo=\count100
\FV@InFile=\read1
\FV@TabBox=\box30
\c@FancyVerbLine=\count101
\FV@StepNumber=\count102
\FV@OutFile=\write3
No file fancyvrb.cfg.
) (/usr/share/texmf/tex/latex/R/upquote.sty
Package: upquote 2003/08/11 v1.1 Covington's upright-quote modification to verb
atim and verb
(/usr/share/texmf-texlive/tex/latex/base/textcomp.sty
Package: textcomp 2005/09/27 v1.99g Standard LaTeX package
Package textcomp Info: Sub-encoding information:
(textcomp) 5 = only ISO-Adobe without \textcurrency
(textcomp) 4 = 5 + \texteuro
(textcomp) 3 = 4 + \textohm
(textcomp) 2 = 3 + \textestimated + \textcurrency
(textcomp) 1 = TS1 - \textcircled - \t
(textcomp) 0 = TS1 (full)
(textcomp) Font families with sub-encoding setting implement
(textcomp) only a restricted character set as indicated.
(textcomp) Family '?' is the default used for unknown fonts.
(textcomp) See the documentation for details.
Package textcomp Info: Setting ? sub-encoding to TS1/1 on input line 71.
(/usr/share/texmf-texlive/tex/latex/base/ts1enc.def
File: ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
Now handling font encoding TS1 ...
... processing UTF-8 mapping file for font encoding TS1
(/usr/share/texmf-texlive/tex/latex/base/ts1enc.dfu
File: ts1enc.dfu 2006/03/30 v1.1i UTF-8 support for inputenc
defining Unicode char U+00A2 (decimal 162)
defining Unicode char U+00A3 (decimal 163)
defining Unicode char U+00A4 (decimal 164)
defining Unicode char U+00A5 (decimal 165)
defining Unicode char U+00A6 (decimal 166)
defining Unicode char U+00A7 (decimal 167)
defining Unicode char U+00A8 (decimal 168)
defining Unicode char U+00A9 (decimal 169)
defining Unicode char U+00AA (decimal 170)
defining Unicode char U+00AC (decimal 172)
defining Unicode char U+00AE (decimal 174)
defining Unicode char U+00AF (decimal 175)
defining Unicode char U+00B0 (decimal 176)
defining Unicode char U+00B1 (decimal 177)
defining Unicode char U+00B2 (decimal 178)
defining Unicode char U+00B3 (decimal 179)
defining Unicode char U+00B4 (decimal 180)
defining Unicode char U+00B5 (decimal 181)
defining Unicode char U+00B6 (decimal 182)
defining Unicode char U+00B7 (decimal 183)
defining Unicode char U+00B9 (decimal 185)
defining Unicode char U+00BA (decimal 186)
defining Unicode char U+00BC (decimal 188)
defining Unicode char U+00BD (decimal 189)
defining Unicode char U+00BE (decimal 190)
defining Unicode char U+00D7 (decimal 215)
defining Unicode char U+00F7 (decimal 247)
defining Unicode char U+0192 (decimal 402)
defining Unicode char U+02C7 (decimal 711)
defining Unicode char U+02D8 (decimal 728)
defining Unicode char U+02DD (decimal 733)
defining Unicode char U+0E3F (decimal 3647)
defining Unicode char U+2016 (decimal 8214)
defining Unicode char U+2020 (decimal 8224)
defining Unicode char U+2021 (decimal 8225)
defining Unicode char U+2022 (decimal 8226)
defining Unicode char U+2030 (decimal 8240)
defining Unicode char U+2031 (decimal 8241)
defining Unicode char U+203B (decimal 8251)
defining Unicode char U+203D (decimal 8253)
defining Unicode char U+2044 (decimal 8260)
defining Unicode char U+204E (decimal 8270)
defining Unicode char U+2052 (decimal 8274)
defining Unicode char U+20A1 (decimal 8353)
defining Unicode char U+20A4 (decimal 8356)
defining Unicode char U+20A6 (decimal 8358)
defining Unicode char U+20A9 (decimal 8361)
defining Unicode char U+20AB (decimal 8363)
defining Unicode char U+20AC (decimal 8364)
defining Unicode char U+20B1 (decimal 8369)
defining Unicode char U+2103 (decimal 8451)
defining Unicode char U+2116 (decimal 8470)
defining Unicode char U+2117 (decimal 8471)
defining Unicode char U+211E (decimal 8478)
defining Unicode char U+2120 (decimal 8480)
defining Unicode char U+2122 (decimal 8482)
defining Unicode char U+2126 (decimal 8486)
defining Unicode char U+2127 (decimal 8487)
defining Unicode char U+212E (decimal 8494)
defining Unicode char U+2190 (decimal 8592)
defining Unicode char U+2191 (decimal 8593)
defining Unicode char U+2192 (decimal 8594)
defining Unicode char U+2193 (decimal 8595)
defining Unicode char U+2329 (decimal 9001)
defining Unicode char U+232A (decimal 9002)
defining Unicode char U+2422 (decimal 9250)
defining Unicode char U+25E6 (decimal 9702)
defining Unicode char U+25EF (decimal 9711)
defining Unicode char U+266A (decimal 9834)
))
LaTeX Info: Redefining \oldstylenums on input line 266.
Package textcomp Info: Setting cmr sub-encoding to TS1/0 on input line 281.
Package textcomp Info: Setting cmss sub-encoding to TS1/0 on input line 282.
Package textcomp Info: Setting cmtt sub-encoding to TS1/0 on input line 283.
Package textcomp Info: Setting cmvtt sub-encoding to TS1/0 on input line 284.
Package textcomp Info: Setting cmbr sub-encoding to TS1/0 on input line 285.
Package textcomp Info: Setting cmtl sub-encoding to TS1/0 on input line 286.
Package textcomp Info: Setting ccr sub-encoding to TS1/0 on input line 287.
Package textcomp Info: Setting ptm sub-encoding to TS1/4 on input line 288.
Package textcomp Info: Setting pcr sub-encoding to TS1/4 on input line 289.
Package textcomp Info: Setting phv sub-encoding to TS1/4 on input line 290.
Package textcomp Info: Setting ppl sub-encoding to TS1/3 on input line 291.
Package textcomp Info: Setting pag sub-encoding to TS1/4 on input line 292.
Package textcomp Info: Setting pbk sub-encoding to TS1/4 on input line 293.
Package textcomp Info: Setting pnc sub-encoding to TS1/4 on input line 294.
Package textcomp Info: Setting pzc sub-encoding to TS1/4 on input line 295.
Package textcomp Info: Setting bch sub-encoding to TS1/4 on input line 296.
Package textcomp Info: Setting put sub-encoding to TS1/5 on input line 297.
Package textcomp Info: Setting uag sub-encoding to TS1/5 on input line 298.
Package textcomp Info: Setting ugq sub-encoding to TS1/5 on input line 299.
Package textcomp Info: Setting ul8 sub-encoding to TS1/4 on input line 300.
Package textcomp Info: Setting ul9 sub-encoding to TS1/4 on input line 301.
Package textcomp Info: Setting augie sub-encoding to TS1/5 on input line 302.
Package textcomp Info: Setting dayrom sub-encoding to TS1/3 on input line 303.
Package textcomp Info: Setting dayroms sub-encoding to TS1/3 on input line 304.
Package textcomp Info: Setting pxr sub-encoding to TS1/0 on input line 305.
Package textcomp Info: Setting pxss sub-encoding to TS1/0 on input line 306.
Package textcomp Info: Setting pxtt sub-encoding to TS1/0 on input line 307.
Package textcomp Info: Setting txr sub-encoding to TS1/0 on input line 308.
Package textcomp Info: Setting txss sub-encoding to TS1/0 on input line 309.
Package textcomp Info: Setting txtt sub-encoding to TS1/0 on input line 310.
Package textcomp Info: Setting futs sub-encoding to TS1/4 on input line 311.
Package textcomp Info: Setting futx sub-encoding to TS1/4 on input line 312.
Package textcomp Info: Setting futj sub-encoding to TS1/4 on input line 313.
Package textcomp Info: Setting hlh sub-encoding to TS1/3 on input line 314.
Package textcomp Info: Setting hls sub-encoding to TS1/3 on input line 315.
Package textcomp Info: Setting hlst sub-encoding to TS1/3 on input line 316.
Package textcomp Info: Setting hlct sub-encoding to TS1/5 on input line 317.
Package textcomp Info: Setting hlx sub-encoding to TS1/5 on input line 318.
Package textcomp Info: Setting hlce sub-encoding to TS1/5 on input line 319.
Package textcomp Info: Setting hlcn sub-encoding to TS1/5 on input line 320.
Package textcomp Info: Setting hlcw sub-encoding to TS1/5 on input line 321.
Package textcomp Info: Setting hlcf sub-encoding to TS1/5 on input line 322.
Package textcomp Info: Setting pplx sub-encoding to TS1/3 on input line 323.
Package textcomp Info: Setting pplj sub-encoding to TS1/3 on input line 324.
Package textcomp Info: Setting ptmx sub-encoding to TS1/4 on input line 325.
Package textcomp Info: Setting ptmj sub-encoding to TS1/4 on input line 326.
))
(/usr/share/texmf-texlive/tex/latex/base/fontenc.sty
Package: fontenc 2005/09/27 v1.99g Standard LaTeX package
(/usr/share/texmf-texlive/tex/latex/base/t1enc.def
File: t1enc.def 2005/09/27 v1.99g Standard LaTeX file
LaTeX Font Info: Redeclaring font encoding T1 on input line 43.
))
(/usr/share/texmf-texlive/tex/latex/ae/ae.sty
Package: ae 2001/02/12 1.3 Almost European Computer Modern
(/usr/share/texmf-texlive/tex/latex/base/fontenc.sty
Package: fontenc 2005/09/27 v1.99g Standard LaTeX package
(/usr/share/texmf-texlive/tex/latex/base/t1enc.def
File: t1enc.def 2005/09/27 v1.99g Standard LaTeX file
LaTeX Font Info: Redeclaring font encoding T1 on input line 43.
)
LaTeX Font Info: Try loading font information for T1+aer on input line 100.
(/usr/share/texmf-texlive/tex/latex/ae/t1aer.fd
File: t1aer.fd 1997/11/16 Font definitions for T1/aer.
))))
No file testing.aux.
\openout1 = `testing.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 14.
LaTeX Font Info: ... okay on input line 14.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 14.
LaTeX Font Info: ... okay on input line 14.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 14.
LaTeX Font Info: ... okay on input line 14.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 14.
LaTeX Font Info: ... okay on input line 14.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 14.
LaTeX Font Info: ... okay on input line 14.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 14.
LaTeX Font Info: ... okay on input line 14.
LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 14.
LaTeX Font Info: ... okay on input line 14.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 14.
LaTeX Font Info: Try loading font information for TS1+cmr on input line 14.
(/usr/share/texmf-texlive/tex/latex/base/ts1cmr.fd
File: ts1cmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: ... okay on input line 14.
Package hyperref Info: Link coloring OFF on input line 14.
(/usr/share/texmf-texlive/tex/latex/hyperref/nameref.sty
Package: nameref 2006/12/27 v2.28 Cross-referencing by name of section
(/usr/share/texmf-texlive/tex/latex/oberdiek/refcount.sty
Package: refcount 2006/02/20 v3.0 Data extraction from references (HO)
)
\c@section@level=\count103
)
LaTeX Info: Redefining \ref on input line 14.
LaTeX Info: Redefining \pageref on input line 14.
\@outlinefile=\write4
\openout4 = `testing.out'.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 17.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 17.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 17.
\tf@toc=\write5
\openout5 = `testing.toc'.
LaTeX Font Info: Try loading font information for T1+aett on input line 30.
(/usr/share/texmf-texlive/tex/latex/ae/t1aett.fd
File: t1aett.fd 1997/11/16 Font definitions for T1/aett.
) [1
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 72.
[2] (./testing.aux)
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
)
Here is how much of TeX's memory you used:
3994 strings out of 94101
54395 string characters out of 1165809
105369 words of memory out of 1500000
7194 multiletter control sequences out of 10000+50000
24855 words of font info for 58 fonts, out of 1200000 for 2000
637 hyphenation exceptions out of 8191
35i,6n,36p,243b,336s stack positions out of 5000i,500n,6000p,200000b,5000s
</usr/share/texmf-texlive/fonts/type1/bluesky/cm/cmbx12.pfb></usr/share/texmf
-texlive/fonts/type1/bluesky/cm/cmr10.pfb></usr/share/texmf-texlive/fonts/type1
/bluesky/cm/cmr12.pfb></usr/share/texmf-texlive/fonts/type1/bluesky/cm/cmr17.pf
b></usr/share/texmf-texlive/fonts/type1/bluesky/cm/cmsltt10.pfb></usr/share/tex
mf-texlive/fonts/type1/bluesky/cm/cmtt10.pfb>
Output written on testing.pdf (2 pages, 38835 bytes).
PDF statistics:
54 PDF objects out of 1000 (max. 8388607)
10 named destinations out of 1000 (max. 131072)
17 words of extra memory for PDF output out of 10000 (max. 10000000)

View File

@ -0,0 +1,86 @@
# -*- mode: org -*-
#+OPTIONS: LaTeX:t
* Sweave and org-mode
If you're reading a PDF version of this document, you should also
look at [[file:testing.Rorg][testing.Rorg]] (the source file) and [[file:testing.org][testing.org]] (the output
of the Sweave process).
Keep in mind that one of the advantages of a block-based approach is
using \texttt{C-'} to edit code in its native mode.
** Use the Sweave package for latex formatting
Org allows us to issue commands to be included in \{LaTeX} export.
#+LATEX_HEADER: \usepackage{Sweave}
** R blocks
The first argument to an R block when using Sweave is the label for
that block.
Not all R blocks are printed. Sweave options allow the printing of
the evaluated code, the output of the code, both, or neither.
*** R code that is not printed
*** R code that is printed
#+BEGIN_LaTeX
\begin{Schunk}
\begin{Sinput}
> c <- 4
\end{Sinput}
\end{Schunk}
#+END_LaTeX
We can use block labels to embed blocks by reference (even if they
weren't printed before).
*** R code that references other blocks
#+BEGIN_LaTeX
\begin{Schunk}
\begin{Sinput}
> a <- 3
> b <- 6
> c <- 4
> a + b + c
\end{Sinput}
\begin{Soutput}
[1] 13
\end{Soutput}
\end{Schunk}
#+END_LaTeX
** Inline references to R data
We can evaluate R code inline.
*** Used in text
The value of =a= is 3.
*** Used in a table
| a | b | c | TOTAL |
|-------+-------+-------+---------------|
| 3 | 6 | 4 | 13 |
** Single-line R commands
If we want a line of R code to be evaluated but not printed,
there's a convenient shorthand. This only works for single lines
of R code, but you can have more than one in a row.
#+R: library(lattice)
#+R: data(cars)
** Graphics
We use values defined elsewhere in the buffer to produce this
graph. The new CAPTION and LABEL arguments work just fine.
#+CAPTION: speed by distance
#+LABEL: fig:speed_by_distance
#+BEGIN_LaTeX
\begin{Schunk}
\begin{Sinput}
> require(lattice)
> print(xyplot(speed ~ dist, cars, panel = function(x, y, ...) {
+ panel.xyplot(x, y, ...)
+ panel.abline(h = a)
+ panel.abline(v = b)
+ }))
\end{Sinput}
\end{Schunk}
#+END_LaTeX
[[./testing-004.pdf]]

View File

@ -0,0 +1,6 @@
\BOOKMARK [1][-]{section.1}{Sweave and org-mode}{}
\BOOKMARK [2][-]{subsection.1.1}{R code that is not printed}{section.1}
\BOOKMARK [2][-]{subsection.1.2}{R code that is printed}{section.1}
\BOOKMARK [2][-]{subsection.1.3}{R code that references other blocks}{section.1}
\BOOKMARK [2][-]{subsection.1.4}{Used in text}{section.1}
\BOOKMARK [2][-]{subsection.1.5}{Used in a table}{section.1}

Binary file not shown.

View File

@ -0,0 +1,82 @@
% Created 2009-02-08 Sun 11:18
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{hyperref}
\usepackage{Sweave}
\title{testing}
\author{Dan}
\date{08 February 2009}
\begin{document}
\maketitle
\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}
\section{Sweave and org-mode}
\label{sec-1}
If you're reading a PDF version of this document, you should also
look at \href{file:///home/dan/src/rorg/existing_tools/RweaveOrg/testing.Rorg}{testing.Rorg} (the source file) and \href{file:///home/dan/src/rorg/existing_tools/RweaveOrg/testing.org}{testing.org} (the output
of the Sweave process).
Keep in mind that one of the advantages of a block-based approach is
using \texttt{C-'} to edit code in its native mode.
\subsection{R code that is not printed}
\label{sec-1.3}
\subsection{R code that is printed}
\label{sec-1.4}
\begin{Schunk}
\begin{Sinput}
> c <- 4
\end{Sinput}
\end{Schunk}
We can use block labels to embed blocks by reference (even if they
weren't printed before).
\subsection{R code that references other blocks}
\label{sec-1.5}
\begin{Schunk}
\begin{Sinput}
> a <- 3
> b <- 6
> c <- 4
> a + b + c
\end{Sinput}
\begin{Soutput}
[1] 13
\end{Soutput}
\end{Schunk}
\subsection{Used in text}
\label{sec-1.7}
The value of \verb=a= is 3.
\subsection{Used in a table}
\label{sec-1.8}
\begin{center}
\begin{tabular}{rrrr}
a & b & c & TOTAL \\
\hline
3 & 6 & 4 & 13 \\
\end{tabular}
\end{center}
\end{document}

View File

@ -0,0 +1,6 @@
\contentsline {section}{\numberline {1}Sweave and org-mode}{1}{section.1}
\contentsline {subsection}{\numberline {1.1}R code that is not printed}{1}{subsection.1.1}
\contentsline {subsection}{\numberline {1.2}R code that is printed}{1}{subsection.1.2}
\contentsline {subsection}{\numberline {1.3}R code that references other blocks}{1}{subsection.1.3}
\contentsline {subsection}{\numberline {1.4}Used in text}{2}{subsection.1.4}
\contentsline {subsection}{\numberline {1.5}Used in a table}{2}{subsection.1.5}

113
nogit-rorg-dan.org Normal file
View File

@ -0,0 +1,113 @@
#+TITLE: rorg --- R and org-mode
* Objectives
** Send data to R from org
Org-mode includes orgtbl-mode, an extremely convenient way of using
tabular data in a plain text file. Currently, spreadsheet
functionality is available in org tables using the emacs package
calc. It would be a boon both to org users and R users to allow
org tables to be manipulated with the R programming language. Org
tables give R users an easy way to enter and display data; R gives
org users a powerful way to perform vector operations, statistical
tests, and visualization on their tables.
*** Implementations
**** naive
Naive implementation would be to use =(org-export-table "tmp.csv")=
and =(ess-execute "read.csv('tmp.csv')")=.
**** org-R
org-R passes data to R from two sources: org tables, or csv
files. Org tables are first exported to a temporary csv file
using [[file:existing_tools/org-R.el::defun%20org%20R%20export%20to%20csv%20csv%20file%20options][org-R-export-to-csv]].
**** org-exp-blocks
**** RweaveOrg
NA
** Evaluate R code in org and deal with output appropriately
*** vector output
When R code evaluation generates vectors and 2-dimensional arrays,
this should be formatted appropriately in org buffers
(orgtbl-mode) as well as in export targets (html, latex). Values
assigned to in the global environment should be available to
blocks of R code elsewhere in the org buffer.
**** Implementations
***** org-R
org-R converts R output (vectors, or matrices / 2d-arrays) to an
org table and stores it in the org buffer, or in a separate org
file (csv output would also be perfectly possible).
***** org-exp-blocks
***** RweaveOrg
*** graphical output
R can generate graphical output on a screen graphics device
(e.g. X11, quartz), and in various standard image file formats
(png, jpg, ps, pdf, etc). When graphical output is generated by
evaluation of R code in Org, at least the following two things are desirable:
1. output to screen for immediate viewing is possible
2. graphical output to file is linked to appropriately from the
org file This should have the automatic consequence that it is
included appropriately in subsequent export targets (html,
latex).
**** Implementations
***** org-R
org-R does (1) if no output file is specified and (2) otherwise
***** org-exp-blocks
***** RweaveOrg
* Notes
** Special editing and evaluation of source code in R blocks
Unfortunately org-mode how two different block types, both useful.
In developing RweaveOrg, a third was introduced.
Eric is leaning towards using the =#+begin_src= blocks, as that is
really what these blocks contain: source code. Austin believes
that specifying export options at the beginning of a block is
useful functionality, to be preserved if possible.
Note that upper and lower case are not relevant in block headings.
*** Source code blocks
Org has an extremely useful method of editing source code and
examples in their native modes. In the case of R code, we want to
be able to use the full functionality of ESS mode, including
interactive evaluation of code.
Source code blocks look like the following and allow for the
special editing of code inside of the block through
`org-edit-special'.
#+BEGIN_SRC r
,## hit C-c ' within this block to enter a temporary buffer in r-mode.
,## while in the temporary buffer, hit C-c C-c on this comment to
,## evaluate this block
a <- 3
a
,## hit C-c ' to exit the temporary buffer
#+END_SRC
*** dblocks
dblocks are useful because org-mode will automatically call
`org-dblock-write:dblock-type' where dblock-type is the string
following the =#+BEGIN:= portion of the line.
dblocks look like the following and allow for evaluation of the
code inside of the block by calling =\C-c\C-c= on the header of
the block.
#+BEGIN: dblock-type
#+END:
*** R blocks
In developing RweaveOrg, Austin created [[file:existing_tools/RweaveOrg/org-sweave.el][org-sweave.el]]. This
allows for the kind of blocks shown in [[file:existing_tools/RweaveOrg/testing.Rorg][testing.Rorg]]. These blocks
have the advantage of accepting options to the Sweave preprocessor
following the #+BEGIN_R declaration.
* tasks
* buffer dictionary
LocalWords: DBlocks dblocks

344
rorg.html Normal file
View File

@ -0,0 +1,344 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
lang="en" xml:lang="en">
<head>
<title>rorg &mdash; R and org-mode</title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
<meta name="generator" content="Org-mode"/>
<meta name="generated" content="2009-02-05 21:16:20 EST"/>
<meta name="author" content="Dan"/>
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
html { font-family: Times, serif; font-size: 12pt; }
.title { text-align: center; }
.todo { color: red; }
.done { color: green; }
.tag { background-color:lightblue; font-weight:normal }
.target { }
.timestamp { color: grey }
.timestamp-kwd { color: CadetBlue }
p.verse { margin-left: 3% }
pre {
border: 1pt solid #AEBDCC;
background-color: #F3F5F7;
padding: 5pt;
font-family: courier, monospace;
font-size: 90%;
overflow:auto;
}
table { border-collapse: collapse; }
td, th { vertical-align: top; }
dt { font-weight: bold; }
div.figure { padding: 0.5em; }
div.figure p { text-align: center; }
.linenr { font-size:smaller }
.code-highlighted {background-color:#ffff00;}
.org-info-js_info-navigation { border-style:none; }
#org-info-js_console-label { font-size:10px; font-weight:bold;
white-space:nowrap; }
.org-info-js_search-highlight {background-color:#ffff00; color:#000000;
font-weight:bold; }
/*]]>*/-->
</style>
<script type="text/javascript">
<!--/*--><![CDATA[/*><!--*/
function CodeHighlightOn(elem, id)
{
var target = document.getElementById(id);
if(null != target) {
elem.cacheClassElem = elem.className;
elem.cacheClassTarget = target.className;
target.className = "code-highlighted";
elem.className = "code-highlighted";
}
}
function CodeHighlightOff(elem, id)
{
var target = document.getElementById(id);
if(elem.cacheClassElem)
elem.className = elem.cacheClassElem;
if(elem.cacheClassTarget)
target.className = elem.cacheClassTarget;
}
/*]]>*/-->
</script>
</head><body>
<h1 class="title">rorg &mdash; R and org-mode</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1 Objectives </a>
<ul>
<li><a href="#sec-1.1">1.1 Send data to R from org </a>
<ul>
<li><a href="#sec-1.1.1">1.1.1 Implementations </a></li>
</ul>
</li>
<li><a href="#sec-1.2">1.2 evaluate R code from org and deal with output appropriately </a>
<ul>
<li><a href="#sec-1.2.1">1.2.1 vector output </a></li>
<li><a href="#sec-1.2.2">1.2.2 graphical output </a></li>
</ul></li>
</ul>
</li>
<li><a href="#sec-2">2 Notes </a>
<ul>
<li><a href="#sec-2.1">2.1 Special editing and evaluation of source code in R blocks </a>
<ul>
<li><a href="#sec-2.1.1">2.1.1 Source code blocks </a></li>
<li><a href="#sec-2.1.2">2.1.2 dblocks </a></li>
<li><a href="#sec-2.1.3">2.1.3 R blocks </a></li>
</ul></li>
</ul>
</li>
<li><a href="#sec-3">3 tasks </a></li>
<li><a href="#sec-4">4 buffer dictionary </a></li>
</ul>
</div>
</div>
<div id="outline-container-1" class="outline-2">
<h2 id="sec-1">1 Objectives </h2>
<div id="text-1">
</div>
<div id="outline-container-1.1" class="outline-3">
<h3 id="sec-1.1">1.1 Send data to R from org </h3>
<div id="text-1.1">
<p>Org-mode includes orgtbl-mode, an extremely convenient way of using
tabular data in a plain text file. Currently, spreadsheet
functionality is available in org tables using the emacs package
calc. It would be a boon both to org users and R users to allow
org tables to be manipulated with the R programming language. Org
tables give R users an easy way to enter and display data; R gives
org users a powerful way to perform vector operations, statistical
tests, and visualization on their tables.
</p>
</div>
<div id="outline-container-1.1.1" class="outline-4">
<h4 id="sec-1.1.1">1.1.1 Implementations </h4>
<div id="text-1.1.1">
<ul>
<li id="sec-1.1.1.1">naive <br/>
Naive implementation would be to use <code>(org-export-table "tmp.csv")</code>
and <code>(ess-execute "read.csv('tmp.csv')")</code>.
</li>
<li id="sec-1.1.1.2">org-R <br/>
org-R passes data to R from two sources: org tables, or csv
files. Org tables are first exported to a temporary csv file
using <a href="existing_tools/org-R.el">org-R-export-to-csv</a>.
</li>
<li id="sec-1.1.1.3">org-exp-blocks <br/>
</li>
<li id="sec-1.1.1.4">RweaveOrg <br/>
NA
</li>
</ul>
</div>
</div>
</div>
<div id="outline-container-1.2" class="outline-3">
<h3 id="sec-1.2">1.2 evaluate R code from org and deal with output appropriately </h3>
<div id="text-1.2">
</div>
<div id="outline-container-1.2.1" class="outline-4">
<h4 id="sec-1.2.1">1.2.1 vector output </h4>
<div id="text-1.2.1">
<p>When R code evaluation generates vectors and 2-dimensional arrays,
this should be formatted appropriately in org buffers (orgtbl-mode) as well
as in export targets (html, latex)
</p><ul>
<li id="sec-1.2.1.1">Implementations <br/>
<ul>
<li id="sec-1.2.1.1.1">org-R <br/>
org-R converts R output (vectors, or matrices / 2d-arrays) to an
org table and stores it in the org buffer, or in a separate org
file (csv output would also be perfectly possible).
</li>
<li id="sec-1.2.1.1.2">org-exp-blocks <br/>
</li>
<li id="sec-1.2.1.1.3">RweaveOrg <br/>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div id="outline-container-1.2.2" class="outline-4">
<h4 id="sec-1.2.2">1.2.2 graphical output </h4>
<div id="text-1.2.2">
<p>R can generate graphical output on a screen graphics device
(e.g. X11, quartz), and in various standard image file formats
(png, jpg, ps, pdf, etc). When graphical output is generated by
evaluation of R code in Org, at least the following two things are desirable:
</p><ol>
<li>
output to screen for immediate viewing is possible
</li>
<li>
graphical output to file is linked to appropriately from the
org file This should have the automatic consequence that it is
included appropriately in subsequent export targets (html,
latex).
</li>
</ol>
<ul>
<li id="sec-1.2.2.1">Implementations <br/>
<ul>
<li id="sec-1.2.2.1.1">org-R <br/>
org-R does (1) if no output file is specified and (2) otherwise
</li>
<li id="sec-1.2.2.1.2">org-exp-blocks <br/>
</li>
<li id="sec-1.2.2.1.3">RweaveOrg <br/>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
<div id="outline-container-2" class="outline-2">
<h2 id="sec-2">2 Notes </h2>
<div id="text-2">
</div>
<div id="outline-container-2.1" class="outline-3">
<h3 id="sec-2.1">2.1 Special editing and evaluation of source code in R blocks </h3>
<div id="text-2.1">
<p>Unfortunately org-mode how two different block types, both useful.
In developing RweaveOrg, a third was introduced.
</p>
<p>
Eric is leaning towards using the <code>#+begin_src</code> blocks, as that is
really what these blocks contain: source code. Austin believes
that specifying export options at the beginning of a block is
useful functionality, to be preserved if possible.
</p>
<p>
Note that upper and lower case are not relevant in block headings.
</p>
</div>
<div id="outline-container-2.1.1" class="outline-4">
<h4 id="sec-2.1.1">2.1.1 Source code blocks </h4>
<div id="text-2.1.1">
<p>Org has an extremely useful method of editing source code and
examples in their native modes. In the case of R code, we want to
be able to use the full functionality of ESS mode, including
interactive evaluation of code.
</p>
<p>
Source code blocks look like the following and allow for the
special editing of code inside of the block through
`org-edit-special'.
</p>
<pre class="src src-r">
,<span style="color: #add8e6;">## </span><span style="color: #add8e6;">hit C-c ' within this block to enter a temporary buffer in r-mode.
</span>
,<span style="color: #add8e6;">## </span><span style="color: #add8e6;">while in the temporary buffer, hit C-c C-c on this comment to
</span>,<span style="color: #add8e6;">## </span><span style="color: #add8e6;">evaluate this block
</span>a <span style="color: #98fb98;">&lt;-</span> 3
a
,<span style="color: #add8e6;">## </span><span style="color: #add8e6;">hit C-c ' to exit the temporary buffer
</span></pre>
</div>
</div>
<div id="outline-container-2.1.2" class="outline-4">
<h4 id="sec-2.1.2">2.1.2 dblocks </h4>
<div id="text-2.1.2">
<p>dblocks are useful because org-mode will automatically call
`org-dblock-write:dblock-type' where dblock-type is the string
following the <code>#+BEGIN:</code> portion of the line.
</p>
<p>
dblocks look like the following and allow for evaluation of the
code inside of the block by calling <code>\C-c\C-c</code> on the header of
the block.
</p>
</div>
</div>
<div id="outline-container-2.1.3" class="outline-4">
<h4 id="sec-2.1.3">2.1.3 R blocks </h4>
<div id="text-2.1.3">
<p>In developing RweaveOrg, Austin created <a href="existing_tools/RweaveOrg/org-sweave.el">org-sweave.el</a>. This
allows for the kind of blocks shown in <a href="existing_tools/RweaveOrg/testing.Rorg">testing.Rorg</a>. These blocks
have the advantage of accepting options to the Sweave preprocessor
following the #+BEGIN<sub>R</sub> declaration.
</p>
</div>
</div>
</div>
</div>
<div id="outline-container-3" class="outline-2">
<h2 id="sec-3">3 tasks </h2>
<div id="text-3">
</div>
</div>
<div id="outline-container-4" class="outline-2">
<h2 id="sec-4">4 buffer dictionary </h2>
<div id="text-4">
<p>LocalWords: DBlocks dblocks
</p></div>
</div>
<div id="postamble"><p class="author"> Author: Dan
<a href="mailto:dan@Tichodroma">&lt;dan@Tichodroma&gt;</a>
</p>
<p class="date"> Date: 2009-02-05 21:16:20 EST</p>
<p>HTML generated by org-mode 6.20f in emacs 22</p>
</div></body>
</html>

View File

@ -1,5 +1,66 @@
#+TITLE: rorg --- R and org-mode
#+SEQ_TODO: TODO PROPOSED | DONE DROPPED MAYBE
#+STARTUP: oddeven
* Overview
** Dan [2009-02-08 Sun]
This project is basically about putting source code into org
files. This isn't just code to look pretty as a source code example,
but code to be evaluated. Org files have 3 main export targets: org,
html and latex. Thus the aim of this project is to produce files in
those formats that have benefitted in some way from the evaluation of
source code that is present in the source org file. We have a current
focus on R code, but we are regarding that more as a working example
than as a defining feature of the project.
The following are three important questions:
1. How is the code placed in the org file?
2. When is the code evaluated?
3. What happens when the code is evaluated?
Let's take them in reverse order, as 1 and 2 can be viewed as
details of the implementation of 3.
*** What happens when the code is evaluated?
Code evaluation can have three relevant consequences
1. It produces text/numeric output
2. It produces graphical output
3. It alters the environment by side effect in some other way
I think our aims here are fairly straightforward to specify: in the
case of (1) we (optionally) incorporate the text output as text in the
target document. In the case of (2) we either place a link to the
graphics or (html/latex) include them inline. We don't need to do anything
about (3), except bear in mind that it's a possibility.
*** When is the code evaluated?
Let's take the three export targets in turn
**** Latex
Here we have some options. I'll use an asterisk to indicate
content which includes the *result* of code evaluation, rather
than the code itself.
***** org \to org* \to latex
This is what RweaveOrg does, e.g.
: Sweave("testing.Rorg", driver=RweaveOrg, syntax=SweaveSyntaxOrg)
Here testing.Rorg is an org file, and Sweave generates another org
file, but with the code evaluated.
This is also what org-R does.
***** org \to latex \to \latex*
This seems like a possibility to me, but AFAIK we don't have it
working. So in the case of R, here you would use something like
`org-export-as-latex', and then from R, run Sweave (with the
RweaveLatex driver) on the exported latex to generate the latex*
file with evaluation results. Since Sweave with RweaveLatex is
an established technology that is heavily used in the R
community, it would be nice to provide this route as an option,
so at any point users can `bail out' and enter a workflow where
they treat the latex/noweb as source code to be edited directly
(rather than editing a org buffer).
* Commentary
@ -202,7 +263,7 @@ different components which have to interactive with R including:
- automatic evaluation on export
- evaluation of \R{} snippets
- evaluation of single source code lines
- sending/recieving vector data
- sending/receiving vector data
I think we currently have two implementation of interaction with R
processes; [[file:existing_tools/org-R.el][org-R.el]] and [[file:existing_tools/exp-blocks/org-exp-blocks.el ][org-exp-blocks.el]]. We should be sure to take