-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetting_help.html
267 lines (252 loc) · 12 KB
/
getting_help.html
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<!DOCTYPE html>
<html>
<head>
<title>Getting help with R</title>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="getting_help_files\rmdshower/node_modules/shower-ribbon/styles/screen-4x3.css">
<link rel="stylesheet" href="getting_help_files\rmdshower/style-common.css">
<link rel="stylesheet" href="getting_help_files\rmdshower/style-ribbon.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.5.1/katex.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.5.1/katex.min.js"></script>
<script src="getting_help_files\rmdshower/auto-render.min.js" type="text/javascript"></script>
<style type="text/css">
div.sourceCode { overflow-x: auto; }
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
margin: 0; padding: 0; vertical-align: baseline; border: none; }
table.sourceCode { width: 100%; line-height: 100%; }
td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
td.sourceCode { padding-left: 5px; }
code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
code > span.dt { color: #902000; } /* DataType */
code > span.dv { color: #40a070; } /* DecVal */
code > span.bn { color: #40a070; } /* BaseN */
code > span.fl { color: #40a070; } /* Float */
code > span.ch { color: #4070a0; } /* Char */
code > span.st { color: #4070a0; } /* String */
code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
code > span.ot { color: #007020; } /* Other */
code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
code > span.fu { color: #06287e; } /* Function */
code > span.er { color: #ff0000; font-weight: bold; } /* Error */
code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
code > span.cn { color: #880000; } /* Constant */
code > span.sc { color: #4070a0; } /* SpecialChar */
code > span.vs { color: #4070a0; } /* VerbatimString */
code > span.ss { color: #bb6688; } /* SpecialString */
code > span.im { } /* Import */
code > span.va { color: #19177c; } /* Variable */
code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code > span.op { color: #666666; } /* Operator */
code > span.bu { } /* BuiltIn */
code > span.ex { } /* Extension */
code > span.pp { color: #bc7a00; } /* Preprocessor */
code > span.at { color: #7d9029; } /* Attribute */
code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
</style>
</head>
<body class="shower list">
<header class="caption">
<h1>Getting help with R</h1>
<p>Ranae Dietzel</p>
</header>
<section id="learning-r" class="titleslide slide level1"><h2 class="shout">Learning R</h2></section><section id="resources" class="slide level2">
<h2>Resources</h2>
<ul>
<li>Books<br />
</li>
<li>Tutorials<br />
</li>
<li>Interactive tutorials<br />
</li>
<li>R packages<br />
</li>
<li>ISU courses and workshops</li>
</ul>
</section><section id="r-for-data-science" class="slide level2">
<h2>R for Data Science</h2>
<center>
<img src="images/r4ds_cover.jpg" width="300px" />
</center>
<p><a href="http://r4ds.had.co.nz/">A book for those just getting started with coding</a></p>
</section><section id="advanced-r" class="slide level2">
<h2>Advanced R</h2>
<center>
<img src="images/advancedR_cover.jpg" width="300px" />
</center>
<p><a href="http://adv-r.had.co.nz/">A book for those who want to improve programming skills and understanding of the R language</a></p>
</section><section id="an-introduction-to-statistical-and-data-sciences-via-r" class="slide level2">
<h2>An Introduction to Statistical and Data Sciences via R</h2>
I have not read this, it looks good.<br />
<center>
<img src="images/blank_cover.jpg" width="300px" />
</center>
<p><a href="getthttps://ismayc.github.io/moderndiver-book/">A friendly book for those getting started</a></p>
</section><section id="tutorials" class="slide level2">
<h2>Tutorials</h2>
<p><a href="www.lynda.com">Lynda.com</a> is a library of tutorials on almost anything. We have access through ISU.</p>
<p>One recommended tutorial:</p>
<p><a href="https://www.lynda.com/R-tutorials/Up-Running-R/120612-2.html?srchtrk=index%3a12%0alinktypeid%3a2%0aq%3aR+essential+training%0apage%3a1%0as%3arelevance%0asa%3atrue%0aproducttypeid%3a2">Up and running with R</a></p>
</section><section id="tutorials-1" class="slide level2">
<h2>Tutorials</h2>
<p>There are also interactive tutorials as well. Most are free for beginners, but may require payment for advanced sessions (~$25/month)</p>
<p>So far, I really like <a href="https://campus.datacamp.com/courses/free-introduction-to-r/chapter-3-matrices-3?ex=3">DataCamp</a></p>
</section><section id="swirl" class="slide level2">
<h2>swirl</h2>
<p><a href="http://swirlstats.com/">Learn R, in R</a></p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">install.packages</span>(<span class="st">"swirl"</span>) </code></pre></div>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(swirl)</code></pre></div>
<pre><code>##
## | Hi! Type swirl() when you are ready to begin.</code></pre>
</section><section id="courses-and-workshops-on-campus" class="slide level2">
<h2>Courses and workshops on campus</h2>
<ul>
<li>STAT 579: Introduction to R (especially if Heike Hoffman is teaching)<br />
</li>
<li><a href="https://stat585-at-isu.github.io/index">STAT 585: Data Technologies for Statistical Analysis</a><br />
</li>
<li><a href="http://agron590-isu.github.io/">AGRON 590: Data Stewardship</a></li>
<li><a href="http://heike.github.io/rwrks/">Week of R</a></li>
</ul>
</section>
<section id="getting-help-with-r" class="titleslide slide level1"><h2 class="shout">Getting help with R</h2></section><section id="resources-1" class="slide level2">
<h2>Resources</h2>
<ul>
<li><a href="www.stackoverflow.com">Stackoverflow</a><br />
</li>
<li><a href="https://community.rstudio.com/">RStudio Community</a><br />
</li>
<li><a href="https://twitter.com/hashtag/rstats?src=hash">#rstats on twitter</a><br />
</li>
<li><a href="https://medium.com/@kierisi/join-the-r-for-data-science-online-learning-community-842527222ab3">Organized learning communities</a><br />
</li>
<li>The <em>help</em> tab in Rstudio is actually helpful - cheatsheets</li>
<li>Your office/labmate, who didn’t learn R in a vaccuum<br />
</li>
<li>Fellow Rgronomists<br />
</li>
<li>Anyone want to check out this online user group and let us know? <a href="http://rusers.co/">R users</a></li>
</ul>
</section><section id="section" class="slide level2">
<h2></h2>
<p>You won’t get good help if you don’t put effort into the asking.</p>
<center>
<img src="images/helpmehelpyou.gif" width="500px" />
</center>
</section><section id="asking-good-questions" class="slide level2">
<h2>Asking good questions</h2>
<p>If you are getting help online, you absolutely must create a reproducible example.</p>
<ul>
<li>You will not get an answer until you do this.<br />
</li>
<li>This is not trivial.<br />
</li>
<li>Good exercise in thinking about your problem.<br />
</li>
<li>Half the time helpers won’t know if their code actually works unless they can run it.</li>
</ul>
<p><strong>Repr</strong>oducible <strong>ex</strong>ample is also called a <strong>reprex</strong></p>
</section>
<section id="steps-to-asking-a-good-question" class="titleslide slide level1"><h2 class="shout">Steps to asking a good question</h2></section><section id="step-1.-do-your-homework." class="slide level2">
<h2>Step 1. Do your homework.</h2>
<ul>
<li>Read the basics related to what you are doing.
<ul>
<li><code>?()</code> in console<br />
</li>
<li>Online documentation, vignettes<br />
</li>
</ul></li>
<li>Check if some one else has asked the same question.
<ul>
<li>Google<br />
</li>
<li>StackOverflow is usually well covered by google, but sometimes searching specifically in the site works better.</li>
</ul></li>
</ul>
<p>People are more willing to give you their time if they can see that you put time in yourself.</p>
</section><section id="step-2.-provide-example-data." class="slide level2">
<h2>Step 2. Provide example data.</h2>
<ul>
<li>Use a built-in dataset <code>library(help = "datasets")</code><br />
</li>
<li>Generate a dummy dataframe</li>
</ul>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Data <-<span class="st"> </span><span class="kw">data.frame</span>(
<span class="dt">X =</span> <span class="kw">sample</span>(<span class="dv">1</span><span class="op">:</span><span class="dv">10</span>),
<span class="dt">Y =</span> <span class="kw">sample</span>(<span class="kw">c</span>(<span class="st">"yes"</span>, <span class="st">"no"</span>), <span class="dv">10</span>, <span class="dt">replace =</span> <span class="ot">TRUE</span>)
) </code></pre></div>
<ul>
<li>If the problem is with your dataset itself, provide some of the data by using <code>head()</code> for the first 6 rows and <code>dput()</code> to describe the structure.</li>
</ul>
</section><section id="step-3.-provide-minimal-code." class="slide level2">
<h2>Step 3. Provide minimal code.</h2>
<ul>
<li>Show everyone what you tried and point out where you think the problem is<br />
</li>
<li>Use only as much code as you have to - have any conversions done before you post<br />
</li>
<li>Make sure they have everything to run the code
<ul>
<li>Include packages (<code>library())</code>)</li>
<li>May want to include R and Rstudio versions (<code>rstudioapi::versionInfo()</code>)</li>
<li>Make sure they can run your code<br />
</li>
<li><code>reprex</code> package</li>
</ul></li>
</ul>
</section>
<section id="you-probably-solved-your-problem-by-now" class="titleslide slide level1"><h2 class="shout">You probably solved your problem by now</h2></section><section id="step-4.-steel-yourself." class="slide level2">
<h2>Step 4. Steel yourself.</h2>
<ul>
<li>People online can be insensitive and callous
<ul>
<li>They still mean well<br />
</li>
<li>Different backgrounds result in different tones</li>
<li>Help is help<br />
</li>
</ul></li>
<li>Admit if you did not follow Steps1-3 well
<ul>
<li>Turn the other cheek</li>
<li>Get over yourself</li>
<li>Edit your question</li>
<li>Do better next time</li>
</ul></li>
</ul>
</section><section id="more-details-on-asking-good-questions" class="slide level2">
<h2>More details on asking good questions</h2>
<ul>
<li><a href="https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/16532098">Stackoverflow FAQ</a><br />
</li>
<li><a href="https://cran.r-project.org/web/packages/reprex/README.html#what-is-a-reprex">What is a reprex?</a><br />
</li>
<li><a href="http://www.njtierney.com/post/2017/01/11/magic-reprex/">reprex package blog</a><br />
</li>
<li><a href="http://reprex.tidyverse.org/">reprex package details</a></li>
</ul>
</section>
<section id="keeping-up-with-r" class="titleslide slide level1"><h2 class="shout">Keeping up with R</h2></section><section id="section-1" class="slide level2">
<h2></h2>
<ul>
<li>All you need to do is follow <a href="https://twitter.com/dataandme">Mara Averick</a> on Twitter<br />
</li>
<li>You may notice some other people to follow while you are on there</li>
</ul>
</section>
<!--
To hide progress bar from entire presentation
just remove “progress” element.
-->
<!-- <div class="progress"></div> -->
<script src="getting_help_files\rmdshower/node_modules/shower/node_modules/shower-core/shower.min.js"></script>
<!-- Copyright © 2015 Yours Truly, Famous Inc. -->
<!-- Photos by John Carey, fiftyfootshadows.net -->
<script>renderMathInElement(document.body);</script>
</body>
</html>