Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(dplyr)
- test <- data.frame('prod_id'= c("shoe", "shoe", "shoe", "shoe", "shoe",
- "shoe", "boat", "boat","boat","boat","boat","boat", "ship", "ship",
- "ship",
- "ship", "ship", "ship"),
- 'seller_id'= c("a", "b", "c", "d", "e", "f", "a","g", "h", "r",
- "q", "b", "qe", "dj", "d3", "kk", "dn", "de"),
- 'Dich'= c(1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0),
- 'price' = c(12, 200, 10, 4, 3, 4, 99, 55, 86, 88, 75, 64, 82,
- 21, 44, 34, 22, 33)
- )
- test2 <- test%>%
- group_by(prod_id) %>%
- (filter = price < 50)
Add Comment
Please, Sign In to add comment