Goals

My goal was to finish all of the coding tutorials, and I did get very close however I am yet to complete this goal. I have only a few videos left! I am making less error messages, and becoming more persistent with errors because I now know it is often a quick fix… or post on the coding channel.

Challenges

My first challenge this week was quite a silly one. I spent half an hour trying to figure out why my plot wasn’t appearing whilst following along with the Data Wrangling tutorials. I fiddled with my data, re-watched the tutorial and realised it was the smallest issue - I was typing “cvs” instead of “csv”. It was Very annoying, but a big learning curve, to go slower and be more precise with my code.

In the Q and A session on Tuesday I was unsure how to split my data by sex, using colour. I fiddled with the code and tried “facet_wrap(var(v1=sex, v2 = sex))”. Despite not finding what I wanted, I stumbled upon how to make separate plots for variables. As seen in the image below. I found that to do this, I use the code “colour (colour = sex)” to the aesthetics part of my code.

I had trouble inserting the above image into this document this morning, because the “import” icon isnt in R studio. After the help of some group members, I was able to insert it by creating a link for my image on google, and then copying that link into the brackets after the code. teamwork!

I was also having trouble writing lists in my Markdown document, using the “-” to make my unordered list however it wouldnt appear as a list in my knitted document. After a quick google search I learned that there must be a blank line between the text and the start of a list!

Successes

The Q and A session helped me put all of my ggplot knowledge into action. I was struggling to piece the code together on my own and was feeling a little overwhelmed with the stacks of coding information I have learnt. However after attempting coding on my own during the Q and A, I had the immediate support when I encountered errors and was able to achieve much more than I thoughtI could. Here is the plot i made during the session:

library(tidyverse)
library(palmerpenguins)

penguins
my_penguins <- penguins
my_penguins_G <- my_penguins %>%
  filter(species == "Gentoo")

ggplot(my_penguins_G) + geom_point(mapping = aes(x = bill_length_mm, y = body_mass_g)) + geom_smooth(mapping = aes(x = bill_length_mm, y = body_mass_g)) + labs(title = "Relationship between Bill Length and Body mass of Gentoo Penguins", x = "Bill Length (mm)", y = "Body mass (g)")

I also learnt how to:

  • reorder data from small to large and large to small
    • (using the functions “arrange”, and “desc”).
  • only select the variables I want to look at
    • (using the select function)
    • This was very helpful as it was very tedious having to scroll through hundreds of data points you are not interested in.

Next Steps

I aim to finish the coding tutorials by Friday and finally put my coding skills to use in the assignment.