| strHead | R Documentation |
Function that takes first n characters from (vector of) character string(s).
strHead( string, n_char=1)
string |
Character string or vector of character strings. |
n_char |
Number of characters to take from the head (starting at the first character) of the string (or vector of strings. Defaults to 1) |
Typical use of the function is return just the first few characters of a character string.
Function returns a character string (vector) consisting of the first n_char of the character string (vector of character strings).
Damian W. Betebenner dbetebenner@nciea.org
strHead(state.name, 2) ### First two characters of each state name
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.