English feliratok

← Cut a Variable - Data Analysis with R

Beágyazókód kérése
5 Languages

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

  1. We've got our new variable your joined so let's look
  2. at its summary it looks like most of our users
  3. joined in 2012 or 2013 and since the values for
  4. this variable are discreet and the range is pretty narrow I'm
  5. going to go ahead and table this variable as well.
  6. Here we can see the distributions of users and each year
  7. joined. Notice that there isn't much data here about early
  8. joiners. To increase the data we have in each tenure category,
  9. we can group some of these years together. The
  10. cut function is often quite useful for making discrete variables
  11. from continuous or numerical ones, sometimes in combination with the
  12. function quantile. Now what I want you to do is
  13. to look at the documentation for cut, and refer
  14. to the link in the instructor notes to complete this
  15. next programming exercise. Your task is to cut the variable
  16. year joined to create four bins, or buckets of users.
  17. The bins will be from 2004 to 2009, 2009
  18. to 2011, 2011 to 2012, and then 2012 to 2014.