Guest User

Untitled

a guest
Jan 21st, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. library(dplyr)
  2.  
  3. test <- data.frame('prod_id'= c("shoe", "shoe", "shoe", "shoe", "shoe",
  4. "shoe", "boat", "boat","boat","boat","boat","boat", "ship", "ship",
  5. "ship",
  6. "ship", "ship", "ship"),
  7. 'seller_id'= c("a", "b", "c", "d", "e", "f", "a","g", "h", "r",
  8. "q", "b", "qe", "dj", "d3", "kk", "dn", "de"),
  9. 'Dich'= c(1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0),
  10. 'price' = c(12, 200, 10, 4, 3, 4, 99, 55, 86, 88, 75, 64, 82,
  11. 21, 44, 34, 22, 33)
  12. )
  13.  
  14. test2 <- test%>%
  15. group_by(prod_id) %>%
  16. (filter = price < 50)
Add Comment
Please, Sign In to add comment