/
lab10.Rmd
94 lines (74 loc) · 1.82 KB
/
lab10.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
---
title: "STA100 Lab10"
author: "Po"
date: "6/1/2021"
output: html_document
---
```{r setup, include=FALSE}
require(pander)
options(width = 100)
knitr::opts_chunk$set(echo = TRUE, message = FALSE, warning = FALSE )
```
# Office Hour
Good luck!
# Help/Documentation
> There is no secret ingredient.
> -- Mr. Ping `r emo::ji("noodle")`
Read the R Documentation of every functions you have seen.
```{r eval=FALSE}
?rnorm
```
```{r eval=FALSE}
?dim
```
```{r eval=FALSE}
?read.csv
```
```{r}
?head
```
```{r eval=FALSE}
?anova
```
```{r eval=FALSE}
?aov
```
```{r}
?TukeyHSD
```
```{r eval=FALSE}
?par
```
```{r eval=FALSE}
?boxplot
```
```{r eval=FALSE}
?hist
```
```{r eval=FALSE}
?plot
```
How Po knows all those built-in functions in R?
- Way 1: Google it
- Way 2: Read R Help/Documentation
# R tutorials that help you survive `r emo::ji("turkey")`
- Interactive R course lessons **swirl** https://swirlstats.com/students.html
Install **swirl** with the following commands.
```{r eval=FALSE}
# If you haven't installed the swirl package yet
install.packages("swirl")
library(swirl)
install_course_github("swirldev", "R_Programming_E")
```
After **swirl** is installed (you only need to do it once), you can start/resume the R tutorial with the commands:
```{r eval=FALSE}
library(swirl)
swirl()
```
Schedule some time to go though all the lessons by yourself! Almost all of the R codes you need to know are here in those lessons.
- If you prefer more static readings (Po did read them to learn R!):
- R for Beginners https://cran.r-project.org/doc/contrib/Paradis-rdebuts_en.pdf
- An Introduction to R https://cran.r-project.org/doc/manuals/r-release/R-intro.pdf
- If you like RStudio's data science things,
- R for Data Science https://r4ds.had.co.nz/
- RStudio Primer https://rstudio.cloud/learn/primers/