forked from AdamWilsonLabEDU/SpatialDataScience
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPS_01_intro.Rmd
More file actions
109 lines (69 loc) · 2.97 KB
/
PS_01_intro.Rmd
File metadata and controls
109 lines (69 loc) · 2.97 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
---
title: "Introduction to R"
---
# Who uses R
## `r paste0('{data-background-iframe="http://r4stats.com/articles/popularity"}')`
[Popularity of Data Science Software](http://r4stats.com/articles/popularity)
## Software in Job Ads

The number of data science jobs for the more popular software (those with 250 jobs or more, 2/2017).
## Data science job trends

R (blue) and SAS (orange).
## Scholarly Articles

Number of scholarly articles found in the most recent complete year (2016) for the more popular data science software. To be included, software must be used in at least 750 scholarly articles.
## Trend in scholarly articles

The number of scholarly articles found in each year by Google Scholar. Only the top six “classic" statistics packages are shown.
## Trend in scholarly articles

The number of scholarly articles found in each year by Google Scholar for classic statistics packages after the curves for SPSS and SAS have been removed.
## Rexer's biannual Data Science Survey

1,220 respondents from 72 different countries
## Tool Use

## Change over time

## Interface to R

# Getting Started
## Questions from the readings?
## Many 'Cheatsheets' available
https://www.rstudio.com/resources/cheatsheets/
## Basic R Data Structures

http://github.com/rstudio/cheatsheets/raw/master/base-r.pdf
## Data Transformation

https://github.com/rstudio/cheatsheets/raw/master/data-transformation.pdf
# Training your eyes
## Fix the errors
Do you see any errors in the following code?
```{R, eval=FALSE}
library(tidyverse)
ggplot(dota = mpg) +
geom_point(mapping = aes(x = displ, y = hwy))
fliter(mpg, cyl = 8)
filter(diamond, carat > 3)
```
## Interpret these error statements
Discuss with your neighbor what the error statement is saying. How would you fix it?
```{R, eval=FALSE}
ggplot(dota = mpg) +
+ geom_point(mapping = aes(x = displ, y = hwy))
#> Error in structure(list(data = data, layers = list(),
#> scales = scales_list(), :
#> argument "data" is missing, with no default
```
```{r, eval=FALSE}
fliter(mpg, cyl = 8)
#> Error in fliter(mpg, cyl = 8) : could not find function "fliter"
```
```{r, eval=FALSE}
filter(diamond, carat > 3)
#> Error in filter(diamond, carat > 3) : object 'diamond' not found
```
## Let's get coding...
Open [today's activity](../01_Rintro.html) and work through the exercise.