Tag: text string
-
Basic text string functions in R
To get the length of a text string (i.e. the number of characters in the string): [code lang=”R” gutter=”false”] nchar()[/code] Using length() would just give you the length of the vector containing the string, which will be 1 if the string is just a single string. To get the position of a regular expression match(es)…