Open zeeva85 opened 5 years ago
This is coming in super late but thanks prof @zeeva85 for reviewing my work 😄. Thanks for taking the time for such a comprehensive review 👏 👏 I took note of your helpful comments. You deserve 1000% on your peer review!! 😄 Thanks Have a great weekend!
😄 Thank you, hope you found those useful.
Well, doing a peer review on your hw or anyones hw, I always end up learning more than I could ever do in that one hour if i spent on my own homework, I never realized that before this class but now I do, because its an example on its own so its like looking a different cheatsheet.
Because in R
there is so many ways to solve a problem, unlike in python
where I believe the philosophy and they way the language is written is to keep it solvable one way or at least the least amount of way and with a much more readable syntax than R
(don't quote me on this read it somewhere along the years).
So likewise thank you 🙏
Peer-Review HW-06 for @rasiimwe
Remarks:
I am very familiar with your work as I have reviewed your fantastic work twice, you have implemented some of the tips I had, not sure if I am going to find anything but here it goes..
Elaborate on above, esp. for "needs work."
The coding style is as usual very presentable, concise and is great job overall. I dont see anything major, maybe a little more consistency with the
=
. Some places had white spaces some didnt have them. I personally would do with spaces for languages where it doesnt matter likeR
without totally perfect as long as it follows the same styling I guess. The coding stratergy is very straight forward and well thought out in in terms of work flow of how you are going to tackle a problem. A quick note on thegeom_smooth(method = "lm", se = T)
, see below.Some specific praise?
I CANNOT BELIEVE!! I did not see of making a ggplot function, as I completely agree with you that the lines for a ggplot is quite a bit of a work out. I specifically loved that fucntion, It is much more useful for quick plots and hats off to you for thinking of that. The work in terms of fucntion is flawless, I am sure if given much more time to explore you would have implemented all my tips on your own accord, Like I said I am very familiar with your impressive work.
WELL DONE !! 👍.
Something I learned? Something I know and that you, my peer, might like to know because it is relevant to something you struggled with.
I never knew about the
I
funnction inR
which is the as it is function, I would think it would be useful in places where a function has a specific behaviour that coerces a data into a another kind of data. Normally we would avoid this by using theas...group-of-functions
, but now I am aware that I can also use the theI
to retain the type of object. I am aware its predominatly used for fomulas but, I count help myself and see what it does in a simple data frame example. Thank you I did learn alot from peer reviewing your work such a treat !! I guess I am too neerdy :DSpecific constructive criticism?
se = T
is by default so I dont setting this is neccesary:-quantreg
package for the function to work :-I think for the function its amazing you would have put so much thought into it, I think you could include just a line to install the package required for the function. Also If I remembered right from StackOverflow, there seems to be a dislike in using the library() in a function as its more prone to failure and hence require() is prefered as it ignores warnings (I think). From reading those forums, I also remembered that they would prefer to call the dependencies via its namespace rather than loading such as this.
ggplot
function, leave in some default values so the user wouldn't have to key them in. This is because running the function without some that is not crucial such as title would result in an error or not providingTRUE
for factors or jitter . This is a very simple to do. I've condensed your function to show how this can be done:-If you want FALSE, you just key in FALSE in the order you wrote it.
I am not sure if you know this but just incase, by loading the
tidyverse
package you attach the aforementioned attaching packages list, that includes "ggplot2", "dplyr", "tibble", "purrr", "stringr". You could have gotten away with 5 extra lines lesser when you use the uselibrary(tidyverse)
."Tidyverse" package is a suite of packages from Hadley that was precompiled on frequently used packages for data manipulation and visualization. It makes it easier to just load the
Tidyverse
suite rather than the individual packages. When you load them separately like with yourrmd
I believe, your just reloading them. The only reason you would want to load them seprately from the top of my head is I guess if you have different versions that you would need for some reason maybe the old version had a function do someting useful for you, like a side behaviour, that was fixed or remove in the newer updates.If you ever want to do that, you have to
install.packages()
with additional arguments specifying them to install on their non default location, as installing the packages using the default argument updates the "Tidyverse attaching" version too. Note that some packages the tidyverse suite is one version behind for instanceggplot
,tidyr
anddplyr
. TrypackageVersion()
and check tidyverse attaching message.Kudos🥇, well done and Thank you @rasiimwe