Strings are text data wrapped in quotes. R has tons of built-in functions and packages (like stringr
) to handle strings easily.
stringr
package for more powerful string operations like str_detect()
, str_replace()
, and str_split()
.
nchar()
โ count characters in a stringtoupper()
/ tolower()
โ change casesubstr()
โ get a substringgsub()
/ sub()
โ replace patternspaste()
/ paste0()
โ concatenate strings