forked from wyoibc/rdar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.html
More file actions
186 lines (186 loc) · 12.2 KB
/
README.html
File metadata and controls
186 lines (186 loc) · 12.2 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="dcterms.date" content="2019-09-16" />
<title>Reproducible Methods in Research and Teaching</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<style>
a.sourceLine { display: inline-block; line-height: 1.25; }
a.sourceLine { pointer-events: none; color: inherit; text-decoration: inherit; }
a.sourceLine:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode { white-space: pre; position: relative; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
code.sourceCode { white-space: pre-wrap; }
a.sourceLine { text-indent: -1em; padding-left: 1em; }
}
pre.numberSource a.sourceLine
{ position: relative; left: -4em; }
pre.numberSource a.sourceLine::before
{ content: attr(title);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; pointer-events: all; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
a.sourceLine::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style>
<link rel="stylesheet" href="avenir-white.css" />
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<header id="title-block-header">
<h1 class="title">Reproducible Methods in Research and Teaching</h1>
<p class="date">September 16, 2019</p>
</header>
<h3 id="a-workshop-by-vikram-e.-chhatre-nicolas-a.-blouin">A Workshop by Vikram E. Chhatre & Nicolas A. Blouin</h3>
<p><br><br></p>
<h2 id="how-to-prepare-for-this-workshop">How to Prepare for this Workshop</h2>
<p>We highly recommend following this tutorial to adequately prepare for the workshop. Before or during the workshop, it will <strong>not</strong> be possible to provide any assistance in installing either base software or needed packages. If you do not have necessary software or lack basic skills in using it (<em>See the section on Required Basic Proficiency below</em>), you will not be able to work through this workshop. We apologize in advance for being blunt on this matter and hope to provide an optimal learning experience.</p>
<p>Every operating system is different and so is the environment it provides in order for software to run without issue. For this reason, it is important that you have full privileges for running and modifying the software on your computer. <strong>Please ensure that you have administrative privileges</strong>. If you are using an institution owned laptop and your IT is reluctant to give you admin control, then please seriously consider bringing a laptop that you own.</p>
<p>The entire workshop and its documentation will be posted at <a href="https://github.com/wyoibc/rdar">github.com/wyoibc/rdar</a>. To avoid paper waste, we will not be printing copies and we urge you to not do so as well.</p>
<h2 id="software-to-be-installed">1. Software to be Installed</h2>
<h3 id="a-r---the-statistical-data-analysis-and-programming-language">(a) R - The Statistical Data Analysis and Programming Language</h3>
<ul>
<li>Follow the link to your operating system and install the latest version <a href="https://cran.cnr.berkeley.edu/">CRAN Mirror at UC Berkeley</a> unless you already have it. As of this writing, the latest version was <code>3.6.1</code> nicknamed <code>Action of the Toes</code>.</li>
</ul>
<h3 id="b-r-studio">(b) R-Studio</h3>
<p>Is graphical front-end for the R programming language - one that we will use during the workshop. Download the <a href="https://www.rstudio.com/products/rstudio/download/#download">Desktop version here</a>.</p>
<h3 id="c-a-text-editor">(c) A Text Editor</h3>
<p>If you have a favorite text editor (Notepad doesn’t count, though Notepad++ does), then you are all set. Otherwise, we highly recommend <code>Vim</code>.</p>
<ul>
<li><p>On Mac OSX, the best way to install Vim is through the <a href="https://brew.sh">Homebrew Package Manager</a>. Install both commandline <code>vim</code> and GUI <code>macvim</code>.</p></li>
<li><p>For Windows, access download link <a href="https://www.vim.org/download.php">on this page</a>.</p></li>
<li><p>Alternatively, on Windows you may also use Notepad++</p></li>
</ul>
<h3 id="d-git-the-version-control-system">(d) Git, the Version Control System</h3>
<ul>
<li>On Mac OSX, Git is available by default. Try <code>git --version</code> in a terminal session. It should spit out something like the following:</li>
</ul>
<div class="sourceCode" id="cb1"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb1-1" title="1"><span class="fu">git</span> --version</a>
<a class="sourceLine" id="cb1-2" title="2"></a>
<a class="sourceLine" id="cb1-3" title="3"><span class="fu">git</span> version 2.20.1 (Apple Git-117)</a></code></pre></div>
<ul>
<li>For Windows, obtain Git from <a href="https://git-scm.com/download/win">this link</a></li>
</ul>
<h3 id="e-pandoc-document-converter">(e) Pandoc Document Converter</h3>
<p><a href="https://pandoc.org">Pandoc</a> is a versatile document converter which we will need during the second half of our workshop. Installation links are avilable <a href="https://pandoc.org/installing.html">on this page</a>.</p>
<h3 id="f-essential-r-packages">(f) Essential R Packages</h3>
<p>The base version of the R programming language installs basic packages for statistical analysis. In addition, you will need several other packages. For the purposes of this workshop, getting the <a href="https://tidyverse.org">Tidyverse</a> group of packages should be sufficient. If we need additional packages during the workshop, we can install those on the fly.</p>
<p>In either R-Studio or in R terminal session, simply type the following to install the tidyverse group:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1"></a>
<a class="sourceLine" id="cb2-2" title="2"><span class="kw">install.packages</span>(<span class="st">"tidyverse"</span>)</a>
<a class="sourceLine" id="cb2-3" title="3"></a></code></pre></div>
<p><strong>Alternatively</strong>, you can get them from GitHub:</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1"></a>
<a class="sourceLine" id="cb3-2" title="2"><span class="kw">require</span>(devtools)</a>
<a class="sourceLine" id="cb3-3" title="3"></a>
<a class="sourceLine" id="cb3-4" title="4">devtools<span class="op">::</span><span class="kw">install_github</span>(<span class="st">'hadley/tidyverse'</span>)</a>
<a class="sourceLine" id="cb3-5" title="5"></a></code></pre></div>
<p>This will install the following packages:</p>
<ul>
<li>ggplot2</li>
<li>dplyr</li>
<li>tidyr</li>
<li>readr</li>
<li>purrr</li>
<li>tibble</li>
<li>stringr</li>
<li>forcats</li>
</ul>
<h3 id="g-get-yourself-a-free-github-account">(g) Get Yourself a Free GitHub Account</h3>
<p>We will interact with GitHub throughout the workshop so you will need a free account with this service. Sign up for a new account on <a href="https://github.com/join?source=header-home">this page</a>.</p>
<h2 id="required-basic-proficiency">2. Required Basic Proficiency</h2>
<p>Because this is not a beginner workshop, we will not have time to cover any introductory lessons in using R. Certain amount of proficiency is expected in R, RStudio and text editing. Below, we provide some examples of the tasks we expect you to be able to do comfortably when you attend the workshop.</p>
<h3 id="a-skills-in-r-and-rstudio">(a) Skills in R and RStudio</h3>
<ul>
<li><p><strong>Basic Operations</strong>: R-Studio interface and what each window within the GUI is showing you</p></li>
<li><p><strong>Package Management</strong>: Ability to install packages from repositories such as</p>
<ul>
<li><p>The <strong>C</strong>omprehensive <strong>R</strong> <strong>A</strong>rchive <strong>N</strong>etwork (<a href="https://cran.r-project.org">CRAN</a>)</p></li>
<li><p><a href="https://github.com">GitHub</a> source code repositories</p></li>
<li><p><a href="https://bioconductor.org">Bioconductor</a> packages</p></li>
</ul></li>
<li><p><strong>File Management</strong>: Opening flat text data files in various formats such as tab-delimited (<code>.txt</code>) or comma-delimited (<code>.csv</code>) and storing them as objects in R’s memory. Saving data frames to hard disk as plain text files.</p></li>
<li><p><strong>Data Wrangling</strong>: Various methods of interfacing with your data objects</p>
<ul>
<li><p>The <code>object[1:10,1:5]</code> coordinate system of accessing specific positions within data</p></li>
<li><p>The <code>object$colname</code> operator</p></li>
<li><p>Basic math operators such as <code>mean</code>, <code>min</code>, <code>max</code>, <code>summary</code> etc.</p></li>
</ul></li>
<li><p><strong>Graphics</strong>: Basic skills in plotting</p>
<ul>
<li>Histograms, scatterplots and basic plotting functions (see <code>?plot()</code> for details)</li>
</ul></li>
<li><p><strong>Finding Help</strong>:</p>
<ul>
<li>R has comprehensive help documentation which can, in most cases be accessed with <code>?function_name</code>.</li>
</ul></li>
</ul>
<h3 id="b-skills-in-using-text-editors">(b) Skills in Using Text Editors</h3>
<ul>
<li><p>Opening new or existing files, editing, saving and closing them</p></li>
<li><p>Perform search and replace functions on the entire file</p></li>
</ul>
<h3 id="c-getting-help-on-online-communities">(c) Getting Help on Online Communities</h3>
<ul>
<li><p>Package-specific help forums</p></li>
<li><p>R-Users Official <a href="https://www.r-project.org/mail.html">mailing lists</a></p></li>
<li><p><a href="https://stackexchange.com">Stackexchange</a> and <a href="https://stackoverflow.com">Stackoverflow</a></p></li>
<li><p><a href="https://www.r-project.org/posting-guide.html">How to ask good question and get useful answers</a></p></li>
<li><p><a href="https://stackoverflow.com/help/minimal-reproducible-example">How to provide a Minimum Working Example</a></p></li>
</ul>
</body>
</html>