forked from Cal-Poly-Advanced-R/Lab_0
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPractice_Lab.Rmd
More file actions
77 lines (46 loc) · 2.37 KB
/
Practice_Lab.Rmd
File metadata and controls
77 lines (46 loc) · 2.37 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
---
title: "Practice Lab"
author: "Ashkan Taghavi"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## R Markdown
First, let's make sure you know how to use R Markdown.
**Make this text bold.**
*Make this text italicized.*
Make these into a bullet point list:
* Apples
* Bananas
* Potatoes
Make it so this chunk shows the plot, but not the source code:
```{r, echo=FALSE}
plot(1:10)
```
Make it so this chunk shows the code, but not the output:
```{r, echo = TRUE, results='hide'}
2 + 2
```
Make it so the file can still knit even though this chunk has an error
```{r, error=TRUE}
2 + a
```
## Getting to know your classmates
1. Find someone in the class who has a different major than you. Tell us their name and why they chose that major.
I met Henry Rossi and he is a statistics major. He chose statistics because he thought it would bew an interesting combination of different fields of study.
2. Find someone who took Stat 331 from a different professor than you. Compare your experiences. Tell us their name and professor. List one or two things that you think you learned more about, and one or two things that they learned more about.
I took STAT 331 with Dr. Theobold, while the person I spoke to, Henry Rossim took STAT 331 with Dr. Frame. I think in my 331 class I learned more about tidyverse, while in Dr. Frame's class they learned more about base R in certain aspects.
3. Find someone in the class who does not share your birth month. Tell us their name and birthday, and use R to find out how many days apart your birthdays are.
I met Sebastian Boksem, his birthday is March 12, 2001. My birthday is November 4, 2000.
Here is code to find out how many days apart our birthdays are:
```{r}
seb_bday <- "2001-03-12"
ash_bday <- "2000-11-04"
seb_bday <- as.Date(seb_bday)
ash_bday <- as.Date(ash_bday)
days_between <- as.numeric(difftime(seb_bday, ash_bday, units = "days"))
cat("Number of days between our birthdays, March 12th and November 4th:", days_between, "days")
```
4. Pick someone in the class who you don't already know. Ask them for a story of the strangest thing that ever happened in a class they took. Share their story (but not their name) here.
The strangest thing that happened in this persons class was that a random student who was not in their class ran through their classroom singing/yelling lyrics to a song.