Advertisement
Guest User

Untitled

a guest
Jul 29th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. Event_ID | Person_ID | Start_Period | End_Period | Event_Type
  2. ------------------------------------------------------------
  3. A | Person1 | 1 | 9 | Assessment
  4. B | Person2 | 3 | 6 | Activity
  5. C | Person3 | 7 | 13 | Assessment
  6.  
  7. Person_ID | Period
  8. ----------------------
  9. Person1 | 1
  10. Person1 | 2
  11. Person1 | 3
  12. Person2 | 1
  13. Person2 | 2
  14. Person2 | 3
  15.  
  16. Person_ID | Period | ActivitiesFreq | AssessmentsFreq
  17. ----------------------------------------------
  18. Person1 | 1 | 3 | 5
  19. Person1 | 2 | 3 | 2
  20. Person1 | 3 | 2 | 7
  21. Person2 | 1 | 7 | 2
  22.  
  23. mutate(PP,SUM(EV$Person_ID==Person_ID,EV$Start_Period<=Period,EV$End_Period>=Period)
  24.  
  25. Warning messages:
  26. 1: In mutate_impl(.data, dots) :
  27. is.na() applied to non-(list or vector) of type 'NULL'
  28. 2: In mutate_impl(.data, dots) :
  29. longer object length is not a multiple of shorter object length
  30. 3: In mutate_impl(.data, dots) :
  31. longer object length is not a multiple of shorter object length
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement