Created
November 26, 2020 06:09
-
-
Save dingaroo/a6ee975b68ca70e8911cb86f87f60586 to your computer and use it in GitHub Desktop.
#Updated Count Occurrence of word in column in dataframe in #R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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