Skip to content

Instantly share code, notes, and snippets.

@dingaroo
Created November 26, 2020 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dingaroo/a6ee975b68ca70e8911cb86f87f60586 to your computer and use it in GitHub Desktop.
Save dingaroo/a6ee975b68ca70e8911cb86f87f60586 to your computer and use it in GitHub Desktop.
#Updated Count Occurrence of word in column in dataframe in #R
library(stringr)
getCount <- function(data,keyword)
{
wcount <- str_count(unique_notes$NOTES, keyword)
# return(data.frame(wcount))
return(wcount)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment