I liked the idea of linking external resources (e.g., how to make boxplots) while reading through your code
Coding strategy
:heavy_check_mark:
Always great to double-check the output of a function with a solution that is calculated manually (e.g., variance in your example)
Presentation: graphs
:heavy_check_mark:
Adequate graphs for exploring basic properties of dataset
Presentation: tables
:heavy_check_mark:
Well, there is actually no table in the R code but the 'to-do-list' in the Readme file is awesome! :bookmark_tabs:
Achievement, creativity
:heavy_check_mark:
Excellent use of emojies :trophy:
Ease of access
:heavy_check_mark:
Great job on the very well documented readme file. The link to the the relevant files made reviewing a very straight forward task
Suggestions for future coding:
I think if you use whitespaces a bit more generously that would make the code somewhat "lighter" and more readable. E.g., consider writing your formula as:
sum((setosa$Sepal.Length - 5.006)^2 ) / (nrow(setosa) - 1) #added some whitespaces
sum((setosa$Sepal.Length-5.006)^2)/(nrow(setosa)-1) #original version
You can specify how the axis labels of your plots are oriented to make the axes more readable
boxplot(..., las = 0) # will make axis labels always parallel to the axis [default],
boxplot(..., las = 1) # always horizontal
boxplot(..., las = 2) # always perpendicular to the axis,
boxplot(..., las = 3) # always vertical.
You did a nice job in exploring the structure of the dataframe first! A way of making this part of the exploration quicker (just one line of code) is using the str() function to directly get an overview of the structure of an R object. This will return the class of the object, its dimensions (you can also use dim() to just combine nrow() and ncol()), along with the type of variables that are stored in each column (i.e., factors, numeric, character etc.)
With that output you know that 'Species' is a factor. To get an overview of the levels of that factor you can do (which does not print every element that is stored in 'Species' but rather the summary of the factors):
Peer review hw-01 for JasmineLib
Suggestions for future coding:
With that output you know that 'Species' is a factor. To get an overview of the levels of that factor you can do (which does not print every element that is stored in 'Species' but rather the summary of the factors):
Cheers, Reto