-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoverview.qmd
More file actions
152 lines (94 loc) · 6.42 KB
/
overview.qmd
File metadata and controls
152 lines (94 loc) · 6.42 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
---
format:
html:
toc-depth: 2
---
# Course Overview {.unnumbered}
## Program Terminology
- The term **R** refers to both the programming language and the software that interprets the scripts written using it.
- An **IDE** is an "Integrated Development Environment" and essentially is another program that lets you interact with R in a productive and efficient manner.
- **[RStudio](https://posit.co/downloads/)** has been a very popular IDE since around 2011 that has continued to flourish and improve throughout the years.
- **[Positron](https://positron.posit.co/)** is a new IDE created by the developers of RStudio that is based off another popular IDE called VSCode - and aimed primarily at Data Scientists
This book teaches you how to use R from within the **R Studio** IDE as we feel it is easier for new learners to start with. You will have to install both onto your computer. Setup instructions are discussed later in Section @sec-install.
## Motivation
### Why use R?
:::: {.columns}
::: {.column width="60%"}
- Open source, cross-platform, and free
- Great for reproducibility
- Tons of learning resources
- Works on data of all shapes and sizes
- Produces high-quality graphics
- Large and welcoming community
- Flexible and extensible. Doesn't do something you want? Create a custom function for yourself.
- Currently R is used in many upper division & graduate level Statistics and Research methods courses in domains such as Public Health, Economics, Finance, and Political Science.
:::
::: {.column width="40%"}
{fig-alt="Manual car gear shift representing coding in R" fig-align="center"}
:::
::::
### Why use R Studio?
:::: {.columns}
::: {.column width="60%"}
- Customizable workspace that docks all windows together.
- Notebook formats that allow for easy sharing of code and output, and integration with other languages (Python, C++, SQL, Stan)
- Syntax highlighting, warning errors when missing a closing parentheses.
- Cross-platform interface. Also works on Windows/iOS/Linux.
- Tab completion for functions. Forget the syntax or a variable name? Popup helpers are available.
- One button publishing of [reproducible documents](https://quarto.org/docs/gallery/) such as reports, dashboards, presentations, websites like this one!
:::
::: {.column width="40%"}
{fig-alt="Automatic car gear shift representing RStudio integrated development environment" fig-align="center"}
:::
::::
## Programming can be scary!
It's important to acknowledge that computer programming is a new skill, that may bring a roller coaster of emotions with it while you learn.
{fig-alt="Line chart labeled 'How much I think I know about R' versus time, showing ups and downs with smiley faces at different stages." width="600"}
[<a href = "https://allisonhorst.com/">Artwork by @allison_horst – used under CC BY 4.0.</a>]{.aside}
But you don't have to go at it alone! You are now part of a _learning community_ that you can lean on for questions and support.
{fig-alt="A person in a cape that reads “code hero” who looks like they are flying through the air while typing on a computer while saying “I’m doing a think all on my own!” The coder’s arms and legs have ropes attached to two hot air balloons lifting them up, with labels on the balloons including “teachers”, “bloggers”, “friends”, “developers”. Below the code hero, several people carry a trampoline with labels “support” and “community” that will catch them if they fall" width="600"}
[<a href = "https://datascience.csuchico.edu/communitycoding">Drop in help available at Community Coding</a>]{.aside}
Learning to program has lots of benefits
- Improves your logical skills and critical problem solving
- Increases your attention to detail
- Increases your self reliance and empowers you to control your own research.
- Your PI will love your awesome graphics and reports.
- Some people think what you do is magic.
- Thinking graduate school? [expect to learn this on your own](http://www.nature.com/nature/journal/v541/n7638/full/nj7638-563a.html)
- [A few](https://skillcrush.com/2015/01/28/laurence-bradford-10-reasons/) [other lists](https://careerfoundry.com/en/blog/web-development/7-benefits-of-learning-to-code/) [of reasons](https://skillcrush.com/2017/01/30/learn-to-code-benefits/)
### Why no point and click?
Because it's not reproducible.
- Which boxes did you click last time?
- New data? Gotta do it all over.
- Need to expand your model? Gotta do it all over.
- Made a mistake in the data coding? Gotta do it all over...
## How this book is organized
<!---
* videos
* sections (intro/intermediate)
* how to use with assignments in an LMS
--->
### Callout blocks
::: {.callout-note title="General Information"}
Black boxes contain notes and information for you to be aware of (Blue in dark mode).
:::
::: {.callout-tip title="You Try It!"}
Green boxes contain "you try it" examples for you to try on your computer.
:::
::: {.callout-important title="Danger"}
Red boxes contain warnings such as common errors or pitfalls.
:::
::: {.callout-caution title="Follow along videos"}
Yellow boxes contain links to supporting videos.
:::
Sometimes there are side notes presented in the right margin [Over Here!]{.aside}
🚧 Section under construction
### Code and keystroke appearance
In these notes, code that is referenced in text is `displayed in this format`, code is executed (run) by R is displayed like this:
```{r}
2+2
```
where the output or result of the code is displayed directly after. The `[1]` that is sometimes displayed with the output helps count the lines of output (sometimes), and can be ignored _most_ of the time.
When giving instructions on which keys to press, buttons are shown as boxes like <kbd>CTRL</kbd> or <kbd>ENTER</kbd> .
## Getting and Submitting Assignments
All assignment files can be found in @sec-assignments . Submission instructions vary by instructor so check your syllabus for details.