Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- collection=mongo(collection="mycs", db="mydb")
- ans<- collection$find()
- df<-as.data.frame(ans)
- extracting<-regmatches(df$text,gregexpr("#(\d|\w)+",df$text))
- ndf<-as.data.frame(extracting)
- p = ggplot(ndf, aes(x = ndf, y = freq)) + geom_bar(fill = "blue")
- p
- # data
- df <-
- structure(list(
- created_at = c("Thu Oct 19 10:46:32 +0000 2017",
- "Thu Oct 19 10:46:32 +0000 2017",
- "Thu Oct 19 10:46:32 +0000 2017"),
- id = c(920964376408068096, 920964376408068096, 920964376408068096),
- text = c("RT @Nagaa27: Me on Open Science Framework #Cryptography #kriptografi #python #freebook #ComputerScience #OpenScienc…",
- "RT @Nagaa27: Me on Open Science Framework #Cryptography #kriptografi #python #freebook #ComputerScience #OpenScienc…",
- "RT @Nagaa27: Me on Open Science Framework #Science #OpenScienc…")))
Add Comment
Please, Sign In to add comment