Skip to Main Content
Florida Tech Evans Library Logo

Introduction to Text Mining

An overview of text mining tools and techniques.

str_detect(string, pattern)

str_detect(string, pattern) will detect a matched pattern specified by the user. The output will be a list of logical values with TRUE indicating the presence of a match and FALSE indicating no match within the string. 

str_which(string, pattern)

str_which(string, pattern) will return a list of indexes with matched patterns specified by the user. 

str_count(string, pattern)

str_count(string, pattern) will return the number of matches within a string based on a pattern specified by the user. 

str_locate(string, pattern)

str_locate(string, pattern) will return the start and end positions of a matched pattern within a string.