Guest User

Untitled

a guest
Oct 15th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. df1<-data%>%
  2. filter(stringr::str_detect(city,'ca')%>%
  3. stringr::str_detect(via,'1v'))
  4.  
  5. data=structure(list(bin = c(0, 0, 0, 0, 1, 1, 0, 0, 1, 1), modalidade = structure(c(1L,
  6. 3L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L), .Label = c("unik", "opfin",
  7. "compras"), class = "factor"), group1 = c(1, 2, 2, 1, 2, 1, 2,
  8. 1, 2, 1), missing = c(NA, 4, 5, NA, 7, 6, NA, NA, 4, 5), score1 = c(3,
  9. 2, 4, 4, 7, 6, 4, 3, 6, 7), valor = c(100, 200, 321, 34, 3424,
  10. 2344, 4232, 43, 22, 22), gender = c("M", "M", "M", "M", "M",
  11. "F", "F", "F", "F", "F"), via = structure(c(2L, 1L, 2L, 1L, 2L,
  12. 1L, 2L, 1L, 2L, 1L), .Label = c("1via", "2via"), class = "factor"),
  13. income = c(1605.52545357496, 1957.10460608825, 3463.77286640927,
  14. 2241.49697413668, 2575.95523679629, 3004.28174249828, 3458.30937661231,
  15. 1786.68619645759, 2065.093211364, 1561.55416276306), city = c("San Francisco",
  16. "Santa Monica", "Santa Monica", "Santa Monica", "Santa Monica",
  17. "Hollywood", "Hollywood", "Hollywood", "Hollywood", "Hollywood"
  18. ), desbloq = structure(c(10553, 9537, 10553, 10553, 9212,
  19. 10658, 10957, 11822, 11822, 10188), class = "Date"), trans = structure(c(10556,
  20. 9541, 10555, 10554, 9218, 10660, 10958, 11823, 11826, 10190
  21. ), class = "Date")), .Names = c("bin", "modalidade", "group1",
  22. "missing", "score1", "valor", "gender", "via", "income", "city",
  23. "desbloq", "trans"), row.names = c(NA, -10L), class = "data.frame")
Add Comment
Please, Sign In to add comment