Skip to Main Content
Florida Tech Evans Library Logo

Introduction to Text Mining

An overview of text mining tools and techniques.

str_c(string, sep, collapse = NULL)

string_c(string, sep, collapse = NULL) will combine multiple strings into a single string. 

Arguments: 

string: the string objects you want to combine into a single string

sep: a pattern you would like to insert between the strings in the combined strings. We recommend using sep = " " to ensure there is a space between the first string and the second. 

collapse = NULL: collapse strings in a character vector into a single string. 

str_dup(string, times)

str(dup, n) will duplicate a string 'n' times where 'n' is a digit specified by the user. 

str_split_fixed(string, pattern, n)

str_split(string, pattern, n) will split a string into 'n' substrings based on a pattern specified by the user. The output will be a list object. Note: You can use str_split_fixed() instead to return the output in the form of matrix object rather than a list.