Go though LabAssignment6.pdf
LabAssignment6.pdf
Download LabAssignment6.Rmd
(LabAssignment6.Rmd, egyptianCotton.csv) in RStudio and run codes inside. Things should be exactly same as LabAssignment6.pdf
.
Download, open LabAssignment6_butter.Rmd
LabAssignment6_butter.Rmd and save as a new Rmd file for your own Lab Assignment submission. Knit this Rmd file to see if you can make a HTML, PDF or Word. If you couldn’t, just use RStudio Cloud or the Binder RStudio set by Po.
Run/add/edit/delete the codes in your own copy of LabAssignment6_butter.Rmd
and add/edit/delete some writings. Knit to see how the .pdf looks like. Tidy up the codes and writings. Knit and submit!
Set working directory.
Put you data egyptianCotton.csv into a good directory.
📊 Which of the following do you prefer?
🦃
ec <- read.csv("/Users/nicepo/IU_is_no1/egyptianCotton.csv")
🦆
ec <- read.csv("C:\\Users\\nicepo\\IU_is_no1\\egyptianCotton.csv")
🦚
ec <- read.csv("egyptianCotton.csv")
🦉
ec <- read.csv("data/egyptianCotton.csv")
🦢
ec <- read.csv("https://ucdavis-sta-100-spring-2021.github.io/polabs/egyptianCotton.csv")
Understand your path for success! https://en.wikipedia.org/wiki/Path_(computing)
There is no secret ingredient. – Mr. Ping 🍜
Read the R Documentation of every functions you have seen.
?rnorm
?dim
?read.csv
?head
?anova
?aov
?TukeyHSD
?par
?boxplot
?hist
?plot
How Po knows all those built-in functions in R?
Way 1: Google it
Way 2: Read R Help/Documentation
Interactive R course lessons swirl https://swirlstats.com/students.html
Install swirl with the following commands.
# 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:
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!):
If you like RStudio’s data science things,