A.16 String Manipulation

paste      # string paste
paste0     # string paste without space
grep       # find pattern
nchar      # count characters of a string
sprintf    # string print with format, C sprintf like
substr     # substring
trimws     # trim white space
toupper    # to upper case
tolower    # to lower case

아래와 같이 쓰면 특정 문자열을 대소문자 구분없이 비교하고자 할 때 유용하다.

toupper(trimws(x)) == "STRING"