Open danaj191 opened 7 years ago
Hi Dana,
Glad to review your assignment4. Overall I think you did good work:
README
file. It helps me get a full picture of how you feel about the assignment.For Activity1 of General data reshaping and relationship to aggregation:
select()
and filter()
to reformat and filter data frame;spread
in the correct way;geom_line()
and created a good-looking and neat line figure;theme_bw()
before, and I looked the function up when reviewing your assignment. I feel it really easy and neat to use for setting the theme of ggplot2. 👍 I will also use it in my following assignment. 😄 For Activity2 of Join, merge, look up part:
README
file first, thus I had a better understanding about what data you chose/ why you chose that in the activity, which is really helpful. :) as.integer()
, which is good and clear;by
parameter; gather()
function here, in a correct way.Here are some friendly suggestions:
Take advantage of this new data shape to scatterplot life expectancy for one country against that of another.
I do feel it is reasonable to use eom_line()
, however, it could be better if you also include the scatterplot to satisfy the assignment requirement;
In Activity2 of Join, merge, look up part, what you did is good! It could be better if you explored different types of join
, then compare the returned data frame to see the difference of different types of join
.
Not sure what kind of problem you met about knitr::kable
, but I also met some problems with it too. Everything worked well in my R markdown but when I uploaded the markdown file produced from .Rmd file to Github, everything is totally messed up. The solution to my issue is to add a the paramter format = 'markdown'
here:
knitr::kable(table, align = 'c', format = 'markdown', digits = 2)
(credit to Joey -- posted in slack) Hope this helps! 😃
-Yingying
Hi @danaj191, here are some comments about your hw04:
Your grade will be emailed to you at a later date.
Hey Dana,
Your homework assignment looks great! You completed both activities with tables and a consequent graph to illustrate the results.
Activity 1:
Your two graphs of Life Expectancy and Soy harvests for Brazil are wonderful. Very easy to read. I also liked that you explain each step as you go through it, especially since this was a “choose your own activity” type of homework and not everyone had to do the same steps you did.
Activity 2:
Very well done using the spread function to move Brazil and Canada from rows to columns. Your graph also looks great and is easy to follow, and you explained your steps very effectively.
Comments:
It would be helpful to make individual folders for each homework assignment. The links are wonderful and can direct the reviewer to the right document but it would make your homework folder less cluttered and more organized.
You mentioned you tried to use the knitr::kable() function for your table of Canada and Brazil using the spread function as well. Have you tried simply using kable()? That seems to work for me when im using R Studio. I switch to kable(format=”html”) when I am done on R studio and ready to knit an html file and it seems to work well when looking at the .md file.
You can add a title to your graphs and tables (purely aesthetic) using ggtitle or in the kable function, you can add caption=”TITLE”
Did you create the new dataframe using R or excel? I ended up using Excel and saving it as a csv file to upload it to R but I am curious as to how easy it is to use R Studio, in case that's the method you chose.
Did you use any resources outside of the class notes? There is a great cheatsheet that I found very helpful especially when dealing with the different join options
Cheers!
Nathan