The coding goals this week were still fairly small steps but definitely felt good to (mostly) accomplish.
Still facing some difficulties in using this the exact same way as RStudio cloud.
I spent a bit of time exploring themes (and deciding which one made me look most like a hacker), and figuring out the differences between this and the RStudio Cloud. While the two are almost identical, I think that the desktop app is a bit faster, and because it isn’t on an internet browser, the Knit pop-up isn’t flagged as malware by my browser (I know you can turn that off but I was being a bit lazy). I also think the user interface is a bit cleaner and it doesn’t take nearly as long to boot up.
However, I encountered a problem when I tried to use the tidyverse library. My computer does not have that package downloaded so I could not use it in this learning log unless I used the cloud studio. So for now, I am still on studio. Hopefully more updates on this next week.
While I was able to complete the Week 2 tutorials, I unfortunately didn’t have time to finish the Week 3 ones, so I will only be talking about my experience with the former.
This week’s tutorials were a little bit more involved but still very easily understandable. I did struggle a little bit understanding the terminology, specifically the differences between functions, arguments, and variables. While Professor Navarro’s explanation was great, it’s taken a while for those concepts to stick in my mind since they are all similar (or at least seem similar to me). I also had some trouble understanding exactly why we were using a boxplot. That is, I understood that the scatter plot was an inappropriate way to visualise the data, but I didn’t really understand what a boxplot does and why we were using it. It has been more than a year since I last did stats, so I had to refresh my memory, which little while.
Additionally, I initially struggled with understanding how to tidy code. It all came together in the end, but at the moment I still have some questions about what the best way to present/type code is.
Everything else was well-explained, especially the part about customising graphs. This seemed intuitive given its similarity to Word and Excel’s graph functions.
I also found the dinosaur graph very amusing so here it is for your viewing pleasure:
library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✓ ggplot2 3.3.3 ✓ purrr 0.3.4
## ✓ tibble 3.1.2 ✓ dplyr 1.0.6
## ✓ tidyr 1.1.3 ✓ stringr 1.4.0
## ✓ readr 1.4.0 ✓ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
dino <- read_csv("dino.csv")
##
## ── Column specification ────────────────────────────────────────────────────────
## cols(
## horizontal = col_double(),
## vertical = col_double()
## )
print(dino)
## # A tibble: 142 x 2
## horizontal vertical
## <dbl> <dbl>
## 1 55.4 97.2
## 2 51.5 96.0
## 3 46.2 94.5
## 4 42.8 91.4
## 5 40.8 88.3
## 6 38.7 84.9
## 7 35.6 79.9
## 8 33.1 77.6
## 9 29.0 74.5
## 10 26.2 71.4
## # … with 132 more rows
picture <- ggplot(data=dino)+
geom_point(mapping = aes(
x = horizontal,
y = vertical))
print(picture)
I really enjoyed this part of the coding tutorial as I am a big believer in accessibility (visually and in terminology as well).
Here is an attempt I made at exploring some of the functions.
library(tidyverse)
picture <- ggplot(data = mpg,
mapping = aes(x = displ, y = hwy)
)+
ggtitle(label = "The Pattern of Fuel Displacement to Highway")+
geom_point()+
geom_smooth()+
scale_x_discrete(
name = "Fuel Displacement"
)+
scale_y_discrete(
name = "Highway"
)
colour = "blue"
print(picture)
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
There are a few things to do this week 1. Finish off coding tutorials from week 3 and 4 since I have a lot due in week 4 2. Work out how to get the tidyverse library in RStudio app 3. Start playing with plotting for the group project
Hope you’ve enjoyed the update!