Extract substrings between delimiters by position
substri.Rdsubstri splits each element in 'x' into substrings and returns the desired substring. 'sep' defines the delimiters separating the strings into substrings, such that the input data between the matches become the fields themselves. 'pos' defines the substring index(es) to be returned.
Arguments
- x
A character vector.
- sep
The pattern to split each element of 'x' by. Default: '\.|-|_'
- pos
The substring index(es) to be returned. Default: 1
- max.nchar
'NULL', or a maximum number of characters that the substrings should be trimmed to contain. Default: NULL
- na.rm
Remove NA substring positions. Default: TRUE