Skip to content
Snippets Groups Projects
Commit ee547e49 authored by Ben Anderson's avatar Ben Anderson
Browse files

moved from private dataknut repo

parents
No related branches found
No related tags found
No related merge requests found
Showing
with 472 additions and 0 deletions
.Rproj.user
.Rhistory
.RData
.Ruserdata
Version: 1.0
RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default
EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8
RnwWeave: Sweave
LaTeX: pdfLaTeX
---
title: "DEMAND bibliography test"
author: "Ben Anderson (b.anderson@soton.ac.uk, `@dataknut`)"
date: 'Last run: `r Sys.time()`'
output:
html_document:
fig_caption: yes
keep_md: yes
number_sections: yes
self_contained: no
toc: yes
toc_depth: 4
toc_float: yes
pdf_document:
number_sections: yes
toc: yes
toc_depth: 4
bibliography: ~/bibliography.bib
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## R Markdown
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
```{r cars}
summary(cars)
```
## Including Plots
You can also embed plots, for example:
```{r pressure, echo=FALSE}
plot(pressure)
```
Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
R packages used:
* base R - for the basics [@baseR]
* readr - fast csv read [@readr]
* data.table - for fast (big) data handling [@data.table]
* ggplot2 - for fancy graphs [@ggplot2]
* car - post-regression stats [@car]
* sandwich - robust SE [@sandwich]
* broom - for tidy regression results [@broom]
* survey - for weighted statistics [@survey04,@survey17]
* stargazer - for pretty regression results [@stargazer]
* doBy - groupwise stats [@doBy]
* knitr - to create this document [@knitr]
# References
\ No newline at end of file
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<meta name="author" content="Ben Anderson (b.anderson@soton.ac.uk, @dataknut)" />
<title>DEMAND bibliography test</title>
<script src="DEMANDbibliographyTest_files/jquery-1.11.3/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="DEMANDbibliographyTest_files/bootstrap-3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<script src="DEMANDbibliographyTest_files/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="DEMANDbibliographyTest_files/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="DEMANDbibliographyTest_files/bootstrap-3.3.5/shim/respond.min.js"></script>
<script src="DEMANDbibliographyTest_files/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="DEMANDbibliographyTest_files/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="DEMANDbibliographyTest_files/tocify-1.9.1/jquery.tocify.js"></script>
<script src="DEMANDbibliographyTest_files/navigation-1.1/tabsets.js"></script>
<link href="DEMANDbibliographyTest_files/highlightjs-9.12.0/default.css" rel="stylesheet" />
<script src="DEMANDbibliographyTest_files/highlightjs-9.12.0/highlight.js"></script>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
if (document.readyState && document.readyState === "complete") {
window.setTimeout(function() { hljs.initHighlighting(); }, 0);
}
}
</script>
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
</head>
<body>
<style type = "text/css">
.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
height: auto;
}
.tabbed-pane {
padding-top: 12px;
}
button.code-folding-btn:focus {
outline: none;
}
</style>
<div class="container-fluid main-container">
<!-- tabsets -->
<script>
$(document).ready(function () {
window.buildTabsets("TOC");
});
</script>
<!-- code folding -->
<script>
$(document).ready(function () {
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')
.children('h1,h2,h3,h4,h5').addClass('toc-ignore');
// establish options
var options = {
selectors: "h1,h2,h3,h4",
theme: "bootstrap3",
context: '.toc-content',
hashGenerator: function (text) {
return text.replace(/[.\\/?&!#<>]/g, '').replace(/\s/g, '_').toLowerCase();
},
ignoreSelector: ".toc-ignore",
scrollTo: 0
};
options.showAndHide = true;
options.smoothScroll = true;
// tocify
var toc = $("#TOC").tocify(options).data("toc-tocify");
});
</script>
<style type="text/css">
#TOC {
margin: 25px 0px 20px 0px;
}
@media (max-width: 768px) {
#TOC {
position: relative;
width: 100%;
}
}
.toc-content {
padding-left: 30px;
padding-right: 40px;
}
div.main-container {
max-width: 1200px;
}
div.tocify {
width: 20%;
max-width: 260px;
max-height: 85%;
}
@media (min-width: 768px) and (max-width: 991px) {
div.tocify {
width: 25%;
}
}
@media (max-width: 767px) {
div.tocify {
width: 100%;
max-width: none;
}
}
.tocify ul, .tocify li {
line-height: 20px;
}
.tocify-subheader .tocify-item {
font-size: 0.90em;
padding-left: 25px;
text-indent: 0;
}
.tocify .list-group-item {
border-radius: 0px;
}
</style>
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
</div>
<div class="toc-content col-xs-12 col-sm-8 col-md-9">
<div class="fluid-row" id="header">
<h1 class="title toc-ignore">DEMAND bibliography test</h1>
<h4 class="author"><em>Ben Anderson (<a href="mailto:b.anderson@soton.ac.uk">b.anderson@soton.ac.uk</a>, <code>@dataknut</code>)</em></h4>
<h4 class="date"><em>Last run: 2018-01-17 22:26:07</em></h4>
</div>
<div id="r-markdown" class="section level2">
<h2><span class="header-section-number">0.1</span> R Markdown</h2>
<p>This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <a href="http://rmarkdown.rstudio.com" class="uri">http://rmarkdown.rstudio.com</a>.</p>
<p>When you click the <strong>Knit</strong> button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:</p>
<pre class="r"><code>summary(cars)</code></pre>
<pre><code>## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00</code></pre>
</div>
<div id="including-plots" class="section level2">
<h2><span class="header-section-number">0.2</span> Including Plots</h2>
<p>You can also embed plots, for example:</p>
<p><img src="DEMANDbibliographyTest_files/figure-html/pressure-1.png" /><!-- --></p>
<p>Note that the <code>echo = FALSE</code> parameter was added to the code chunk to prevent printing of the R code that generated the plot.</p>
<p>R packages used:</p>
<ul>
<li>base R - for the basics <span class="citation">(R Core Team 2016)</span></li>
<li>readr - fast csv read <span class="citation">(Wickham, Hester, and Francois 2016)</span></li>
<li>data.table - for fast (big) data handling <span class="citation">(Dowle et al. 2015)</span></li>
<li>ggplot2 - for fancy graphs <span class="citation">(Wickham 2009)</span></li>
<li>car - post-regression stats <span class="citation">(Fox and Weisberg 2011)</span></li>
<li>sandwich - robust SE <span class="citation">(Zeileis 2006)</span></li>
<li>broom - for tidy regression results <span class="citation">(Robinson 2016)</span></li>
<li>survey - for weighted statistics <span class="citation">(Lumley 2004,<span class="citation">(<span class="citeproc-not-found" data-reference-id="survey17"><strong>???</strong></span>)</span>)</span></li>
<li>stargazer - for pretty regression results <span class="citation">(Hlavac 2015)</span></li>
<li>doBy - groupwise stats <span class="citation">(Højsgaard and Halekoh 2016)</span></li>
<li>knitr - to create this document <span class="citation">(Xie 2016)</span></li>
</ul>
</div>
<div id="references" class="section level1 unnumbered">
<h1>References</h1>
<div id="refs" class="references">
<div id="ref-data.table">
<p>Dowle, M, A Srinivasan, T Short, S Lianoglou with contributions from R Saporta, and E Antonyan. 2015. <em>Data.table: Extension of Data.frame</em>. <a href="https://CRAN.R-project.org/package=data.table" class="uri">https://CRAN.R-project.org/package=data.table</a>.</p>
</div>
<div id="ref-car">
<p>Fox, John, and Sanford Weisberg. 2011. <em>An R Companion to Applied Regression</em>. Second. Thousand Oaks CA: Sage. <a href="http://socserv.socsci.mcmaster.ca/jfox/Books/Companion" class="uri">http://socserv.socsci.mcmaster.ca/jfox/Books/Companion</a>.</p>
</div>
<div id="ref-stargazer">
<p>Hlavac, Marek. 2015. <em>Stargazer: Well-Formatted Regression and Summary Statistics Tables</em>. Cambridge, USA: Harvard University. <a href="http://CRAN.R-project.org/package=stargazer" class="uri">http://CRAN.R-project.org/package=stargazer</a>.</p>
</div>
<div id="ref-doBy">
<p>Højsgaard, Søren, and Ulrich Halekoh. 2016. <em>DoBy: Groupwise Statistics, Lsmeans, Linear Contrasts, Utilities</em>. <a href="https://CRAN.R-project.org/package=doBy" class="uri">https://CRAN.R-project.org/package=doBy</a>.</p>
</div>
<div id="ref-survey04">
<p>Lumley, T. 2004. “Analysis of Complex Survey Samples.” <em>Journal of Statistical Software</em> 9 (1): 1–19.</p>
</div>
<div id="ref-baseR">
<p>R Core Team. 2016. <em>R: A Language and Environment for Statistical Computing</em>. Vienna, Austria: R Foundation for Statistical Computing. <a href="https://www.R-project.org/" class="uri">https://www.R-project.org/</a>.</p>
</div>
<div id="ref-broom">
<p>Robinson, David. 2016. <em>Broom: Convert Statistical Analysis Objects into Tidy Data Frames</em>. <a href="https://CRAN.R-project.org/package=broom" class="uri">https://CRAN.R-project.org/package=broom</a>.</p>
</div>
<div id="ref-ggplot2">
<p>Wickham, Hadley. 2009. <em>Ggplot2: Elegant Graphics for Data Analysis</em>. Springer-Verlag New York. <a href="http://ggplot2.org" class="uri">http://ggplot2.org</a>.</p>
</div>
<div id="ref-readr">
<p>Wickham, Hadley, Jim Hester, and Romain Francois. 2016. <em>Readr: Read Tabular Data</em>. <a href="https://CRAN.R-project.org/package=readr" class="uri">https://CRAN.R-project.org/package=readr</a>.</p>
</div>
<div id="ref-knitr">
<p>Xie, Yihui. 2016. <em>Knitr: A General-Purpose Package for Dynamic Report Generation in R</em>. <a href="https://CRAN.R-project.org/package=knitr" class="uri">https://CRAN.R-project.org/package=knitr</a>.</p>
</div>
<div id="ref-sandwich">
<p>Zeileis, Achim. 2006. “Object-Oriented Computation of Sandwich Estimators.” <em>Journal of Statistical Software</em> 16 (9): 1–16. <a href="http://www.jstatsoft.org/v16/i09/." class="uri">http://www.jstatsoft.org/v16/i09/.</a></p>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
});
</script>
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>
</body>
</html>
---
title: "DEMAND bibliography test"
author: "Ben Anderson (b.anderson@soton.ac.uk, `@dataknut`)"
date: 'Last run: 2018-01-17 22:26:07'
output:
html_document:
fig_caption: yes
keep_md: yes
number_sections: yes
self_contained: no
toc: yes
toc_depth: 4
toc_float: yes
pdf_document:
number_sections: yes
toc: yes
toc_depth: 4
bibliography: bibliography.bib
---
## R Markdown
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
```r
summary(cars)
```
```
## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00
```
## Including Plots
You can also embed plots, for example:
![](DEMANDbibliographyTest_files/figure-html/pressure-1.png)<!-- -->
Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
R packages used:
* base R - for the basics [@baseR]
* readr - fast csv read [@readr]
* data.table - for fast (big) data handling [@data.table]
* ggplot2 - for fancy graphs [@ggplot2]
* car - post-regression stats [@car]
* sandwich - robust SE [@sandwich]
* broom - for tidy regression results [@broom]
* survey - for weighted statistics [@survey04,@survey17]
* stargazer - for pretty regression results [@stargazer]
* doBy - groupwise stats [@doBy]
* knitr - to create this document [@knitr]
# References
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File added
File added
File added
File added
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment