Description
Homework 1
In this homework you will be working with the chickwts dataset built into R. This data set contains weight measurements of chicks fed on different food sources to assess their effectiveness on growth rate.
Problem 1: Use ggplot to make a histogram of the weight column. Manually choose appropriate values for binwidth and center . Explain your choice of values in 2-3 sentences.
By setting binwidth to 20, we are chunking the weights into 5 ranges per 100 units. By setting center to 10, we are centering each bar on (110,130,150…) Therefore, it is easy to tell how many chickens are in the range 100-119, 120-139, 140-159, etc.
Problem 2: Modify the plot from Problem 1 to show one panel per feed. Hint: Use facet_wrap() .
file:///Users/abelardoriojas/Downloads/HW1.html 1/2
file:///Users/abelardoriojas/Downloads/HW1.html 2/2
Reviews
There are no reviews yet.