-
Notifications
You must be signed in to change notification settings - Fork 11
/
iris_data_set_bib1.rmd
61 lines (53 loc) · 1.7 KB
/
iris_data_set_bib1.rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
```{r child='setup.rmd'}
```
```{r engine='cat', engine.opts=list(file='extra1.tex')}
% hoqc start inserted extra1.tex (via yaml 'in_header:')
% definitions for fancy headers/footers
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\cfoot{Page \thepage~of \pageref{LastPage}}
\usepackage{lastpage}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0.5pt}
% hoqc end inserted extra1.tex (via yaml 'in_header:')
```
```{r engine='cat', engine.opts=list(file='extra2.tex')}
% hoqc start inserted extra2.tex (via yaml 'before_body:')
% not used here
% hoqc end inserted extra2.tex (via yaml 'before_body:')
```
```{r setheader, eval= T,echo=F, results='asis'}
chead = paste0('Iris data V',params$doc_version)
chead = sprintf("\\chead{%s}",chead)
cat(chead)
```
# Libraries used
```{r echo=TRUE,warning=FALSE,message=FALSE}
library(xtable)
library(ggplot2)
library(ggthemes)
```
```{r echo=FALSE,warning=FALSE,message=FALSE}
# various constants/calculations we do not show in the text
altplot = params$altplot
if (altplot == T) {
fam = 'serif'
extra_text = 'with alternative themes'
} else {
fam = 'sans'
extra_text = ''
}
numlist = 10 # number of observations in iris data set that is listed
tabcap1 = sprintf('first %.0f observations of iris data set',numlist)
figr1a = "default theme"
figr1b = "examples of non-default themes"
figr1bab = c('stata theme: s2color','The Economist theme: theme\\_economist')
if (altplot == T) {
altplot_text = paste(
'The themes are the stata color theme (*s2color*) and a theme often used in the magazine *The Economist*.',
'These can be found ',ref_tab('r1b1','F','F'),'and', ref_tab('r1b2','F',prefix=''),'.') ;
} else {
altplot_text = "" ;
}
```