fork download
  1. NewCData <- structure(list(timestamp = structure(c(1L, 3L, 2L, 6L, 4L, 4L,
  2. 5L, 8L, 7L, 9L), .Label = c("2015-10-30 21:37:58", "2015-10-30 21:38:02",
  3. "2015-10-30 21:38:03", "2015-10-30 21:38:06", "2015-10-30 21:38:07",
  4. "2015-10-30 21:38:10", "2015-10-30 21:38:14", "2015-10-30 21:38:32",
  5. "2015-10-30 21:39:04"), class = "factor"), id_str = structure(c(1L,
  6. 3L, 2L, 7L, 4L, 5L, 6L, 9L, 8L, 10L), .Label = c("660209050429186048",
  7. "660209067584016384", "660209072768212992", "660209083505504256",
  8. "660209086143688704", "660209087628578816", "660209102790914048",
  9. "660209119152893952", "660209195162206208", "660209325986549760"
  10. ), class = "factor"), user.id_str = structure(c(1L, 3L, 8L, 5L,
  11. 5L, 2L, 4L, 6L, 9L, 7L), .Label = c("277335277", "32380087",
  12. "325105950", "33398863", "68956490", "808114195", "87712431",
  13. "90280824", "949996219"), class = "factor"), user.followers_count = structure(c(7L,
  14. 2L, 8L, 4L, 4L, 3L, 6L, 9L, 5L, 1L), .Label = c("10212", "1062",
  15. "1389", "15227", "2214", "2851", "38", "4137", "55"), class = "factor"),
  16. ideology = structure(c(2L, 4L, 3L, 9L, 9L, 5L, 8L, 6L, 1L,
  17. 7L), .Label = c("-0.309303177803536", "-0.393703659798908",
  18. "-0.795976086971656", "-0.811321629152632", "-0.946143178314071",
  19. "-1.16317298915931", "0.353843466445817", "1.09919837237897",
  20. "2.29286233202781"), class = "factor"), text = structure(c(2L,
  21. 9L, 4L, 1L, 3L, 10L, 5L, 7L, 6L, 8L), .Label = c("Better Dead than Red! Bill Gates says that only socialism can save us ",
  22. "Expert briefing on #disarmament #SDGs @NMUN ",
  23. "I see red people Bill Gates says that only socialism can save us from climate change ",
  24. "RT: Oddly enough, some Republicans think climate change is real: Oddly enough,… #UniteBlue ",
  25. "Ted Cruz: ‘Climate change is not science, it’s religion’ via @glennbeck",
  26. "This is an amusing headline: \"Bill Gates says that only socialism can save us from climate change\"",
  27. "Unusual Weather Kills Gulf of Maine Cod : Discovery News #globalwarming ",
  28. "What do the remaining Republican candidates have to say about climate change? #FixGov",
  29. "Who Uses #NASA Earth Science Data? He looks at impact of #aerosols on #climate #weather!",
  30. "Why go for ecosystem basses conservation! #ClimateChange #Raajje #Maldives"
  31. ), class = "factor")), .Names = c("timestamp", "id_str",
  32. "user.id_str", "user.followers_count", "ideology", "text"), row.names = c(NA,
  33. 10L), class = "data.frame")
  34. keywords_C <- c("climate change","climate","climatechange","global warming","globalwarming")
  35. NewCData[with(NewCData, grepl(paste0("\\b(?:",paste(keywords_C, collapse="|"),")\\b"), text)),]
Success #stdin #stdout 0.2s 184000KB
stdin
Standard input is empty
stdout
             timestamp             id_str user.id_str user.followers_count
2  2015-10-30 21:38:03 660209072768212992   325105950                 1062
3  2015-10-30 21:38:02 660209067584016384    90280824                 4137
5  2015-10-30 21:38:06 660209083505504256    68956490                15227
8  2015-10-30 21:38:32 660209195162206208   808114195                   55
9  2015-10-30 21:38:14 660209119152893952   949996219                 2214
10 2015-10-30 21:39:04 660209325986549760    87712431                10212
             ideology
2  -0.811321629152632
3  -0.795976086971656
5    2.29286233202781
8   -1.16317298915931
9  -0.309303177803536
10  0.353843466445817
                                                                                                 text
2            Who Uses #NASA Earth Science Data? He looks at impact of #aerosols on #climate #weather!
3        RT: Oddly enough, some Republicans think climate change is real: Oddly enough,…  #UniteBlue 
5               I see red people Bill Gates says that only socialism can save us from climate change 
8                           Unusual Weather Kills Gulf of Maine Cod : Discovery News #globalwarming  
9  This is an amusing headline: "Bill Gates says that only socialism can save us from climate change"
10              What do the remaining Republican candidates have to say about climate change? #FixGov