filesstrings (version 0.3.2)

PutInPos: Put specified strings in specified positions

Description

Create a charachter vector with a set of strings at specified positions in that charachter vector, with the rest of it taken up by empty strings.

Usage

PutInPos(strings, positions)

Arguments

strings
A charachter vector of the strings to put in positions (coerced by as.character if not charachter already).
positions
The indices of the charachter vector to be occupied by the elements of strings. Must be the same length as strings or of length 1.

Value

A charachter vector.

Examples

Run this code
PutInPos(1:3, c(1, 8, 9))
PutInPos(c("Apple", "Orange", "County"), c(5, 7, 8))
PutInPos(1:2, 5)

Run the code above in your browser using DataCamp Workspace