-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetting_help.Rmd
163 lines (114 loc) · 5.38 KB
/
getting_help.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
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
---
title: "Getting help with R"
author: "Ranae Dietzel"
ratio: 16x10
output:
rmdshower::shower_presentation:
self_contained: false
katex: true
theme: ribbon
---
#Learning R
##Resources
* Books
* Tutorials
* Interactive tutorials
* R packages
* ISU courses and workshops
##R for Data Science
<center><img src="images/r4ds_cover.jpg" width="300px" /></center>
[A book for those just getting started with coding](http://r4ds.had.co.nz/)
##Advanced R
<center><img src="images/advancedR_cover.jpg" width="300px" /></center>
[A book for those who want to improve programming skills and understanding of the R language](http://adv-r.had.co.nz/)
##An Introduction to Statistical and Data Sciences via R
I have not read this, it looks good.
<center><img src="images/blank_cover.jpg" width="300px" /></center>
[A friendly book for those getting started](getthttps://ismayc.github.io/moderndiver-book/)
##Tutorials
[Lynda.com](www.lynda.com) is a library of tutorials on almost anything. We have access through ISU.
One recommended tutorial:
[Up and running with R](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)
##Tutorials
There are also interactive tutorials as well. Most are free for beginners, but may require payment for advanced sessions (~$25/month)
So far, I really like [DataCamp](https://campus.datacamp.com/courses/free-introduction-to-r/chapter-3-matrices-3?ex=3)
##swirl
[Learn R, in R](http://swirlstats.com/)
```{r swirl, eval=FALSE}
install.packages("swirl")
```
```{r, hi swirl, warning=FALSE}
library(swirl)
```
##Courses and workshops on campus
* STAT 579: Introduction to R (especially if Heike Hoffman is teaching)
* [STAT 585: Data Technologies for Statistical Analysis](https://stat585-at-isu.github.io/index)
* [AGRON 590: Data Stewardship](http://agron590-isu.github.io/)
* [Week of R](http://heike.github.io/rwrks/)
#Getting help with R
##Resources
* [Stackoverflow](www.stackoverflow.com)
* [RStudio Community](https://community.rstudio.com/)
* [#rstats on twitter](https://twitter.com/hashtag/rstats?src=hash)
* [Organized learning communities](https://medium.com/@kierisi/join-the-r-for-data-science-online-learning-community-842527222ab3)
* The *help* tab in Rstudio is actually helpful - cheatsheets
* Your office/labmate, who didn't learn R in a vaccuum
* Fellow Rgronomists
* Anyone want to check out this online user group and let us know? [R users](http://rusers.co/)
##
You won't get good help if you don't put effort into the asking.
<center><img src="images/helpmehelpyou.gif" width="500px" /></center>
##Asking good questions
If you are getting help online, you absolutely must create a reproducible example.
* You will not get an answer until you do this.
* This is not trivial.
* Good exercise in thinking about your problem.
* Half the time helpers won't know if their code actually works unless they can run it.
**Repr**oducible **ex**ample is also called a **reprex**
#Steps to asking a good question
##Step 1. Do your homework.
* Read the basics related to what you are doing.
+ `?()` in console
+ Online documentation, vignettes
* Check if some one else has asked the same question.
+ Google
+ StackOverflow is usually well covered by google, but sometimes searching specifically in the site works better.
People are more willing to give you their time if they can see that you put time in yourself.
##Step 2. Provide example data.
* Use a built-in dataset `library(help = "datasets")`
* Generate a dummy dataframe
```{r, dataframe}
Data <- data.frame(
X = sample(1:10),
Y = sample(c("yes", "no"), 10, replace = TRUE)
)
```
* If the problem is with your dataset itself, provide some of the data by using `head()` for the first 6 rows and `dput()` to describe the structure.
##Step 3. Provide minimal code.
* Show everyone what you tried and point out where you think the problem is
* Use only as much code as you have to - have any conversions done before you post
* Make sure they have everything to run the code
+ Include packages (`library())`)
+ May want to include R and Rstudio versions (`rstudioapi::versionInfo()`)
+ Make sure they can run your code
+ `reprex` package
#You probably solved your problem by now
##Step 4. Steel yourself.
* People online can be insensitive and callous
+ They still mean well
+ Different backgrounds result in different tones
+ Help is help
* Admit if you did not follow Steps1-3 well
+ Turn the other cheek
+ Get over yourself
+ Edit your question
+ Do better next time
##More details on asking good questions
* [Stackoverflow FAQ](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/16532098)
* [What is a reprex?](https://cran.r-project.org/web/packages/reprex/README.html#what-is-a-reprex)
* [reprex package blog](http://www.njtierney.com/post/2017/01/11/magic-reprex/)
* [reprex package details](http://reprex.tidyverse.org/)
#Keeping up with R
##
* All you need to do is follow [Mara Averick](https://twitter.com/dataandme) on Twitter
* You may notice some other people to follow while you are on there