English subtitles

← Plotting It All Together - Data Analysis with R

Get Embed Code
5 Languages

Showing Revision 2 created 05/24/2016 by Udacity Robot.

  1. We've done two things up to this point. We
  2. created a variable called year_joined, based on the tenure variable,
  3. and we converted year_joined, to the variable year_joined_bucket. A categorical
  4. variable. That bin their users into different groups. Let's table
  5. this new variable to see the distribution in each group.
  6. Here we can see that we have our four bins
  7. of users, depending on when they joined Facebook, and it
  8. looks like two people have a value of NA. Let's
  9. use this new year joined bucket variable to create a
  10. line graph Like we did for gender at the start of
  11. the lesson. As a reminder, here's the code that generated this
  12. plot earlier. Also, notice how we compute the median friend count
  13. for each age using the fun.wide parameter, and the summary for
  14. the stat parameter. Using a similar code structure that we see
  15. here. I want you to create a plot for friend count
  16. versus age, so that each year join bucket has its own
  17. line on the graph. In other words, each
  18. bucket will be a color line that tracks the
  19. median friend count across the age of users,
  20. just as it did in this plot for genders.