str_left | R Documentation |
Given a character vector, str_left()
returns the left side of a string.
str_left(string, n = 1)
string |
The character from which the left portion will be returned. |
n |
Optional. The number of characters to return from the left side of string |
A character vector
str_right()
which extracts characters from the right and str_mid()
which returns a segment of character strings.
str_left("Nigeria")
str_left("Nigeria", n = 3)
str_left(c("Female", "Male", "Male", "Female"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.