SHARE
TWEET

Untitled

a guest Jul 16th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ID  Type            Registered
  2. P40 Pre-Initial     Yes
  3. P40 Review  
  4. P40 Review  
  5. P42 Initial         Yes
  6. P43 Initial         Yes
  7. P43 Review  
  8. P44 Pre-Initial     Yes
  9. P44 Review
  10.      
  11. tt <- structure(list(ID = c("P40", "P40", "P40", "P42", "P43", "P43",
  12.                             "P44", "P44"),Type = c("Pre-Initial", "Review", "Review", "Initial", "Initial", "Review", "Pre-Initial", "Review"),
  13.                      Registered = c("Yes", "", "", "Yes", "Yes", "", "Yes", "")),
  14.                 class = "data.frame", row.names = c(NA, -8L))
  15.      
  16. ID  Type            Registered
  17. P40 Pre-Initial Yes
  18. P40 Review  
  19. P40 Review  
  20. P43 Initial         Yes
  21. P43 Review  
  22. P44 Pre-Initial Yes
  23. P44 Review
  24.      
  25. tt %>% group_by(ID) %>%
  26.     slice(which(Registered == "Yes" & any(Type != "Review")))
  27. )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top