View source: R/str-put-in-pos.R
put_in_pos | R Documentation |
Create a character vector with a set of strings at specified positions in that character vector, with the rest of it taken up by empty strings.
put_in_pos(strings, positions)
str_put_in_pos(strings, positions)
strings |
A character vector of the strings to put in positions (coerced by as.character if not character already). |
positions |
The indices of the character vector to be occupied by the elements of strings. Must be the same length as strings or of length 1. |
A character vector.
put_in_pos(1:3, c(1, 8, 9))
put_in_pos(c("Apple", "Orange", "County"), c(5, 7, 8))
put_in_pos(1:2, 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.