Description Usage Arguments Value
designed to find the position of a particular character in a string. Useful with substr function
1 | char.position(x, pattern, position = 0, instance = 1)
|
x |
Character vector to search through |
pattern |
character string that the function will attempt to find in x |
position |
positive or negative integer used to modulate the position returned if pattern is found in x, char.position returns the exact position by default. -1 returns position before pattern and 1 returns position after pattern. |
instance |
positive integer used to modulate which instance of the pattern is returned. Default is first instance. Assign "last" to return last instance in string |
Number vector of position of pattern found, returns NA if not found
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.