View source: R/insert_vector_entry.R
insert_vector_entry | R Documentation |
This function inserts a value into a vector.
insert_vector_entry(v, x, p)
v |
[ |
x |
[ |
p |
[
|
A vector
.
Other vector helpers:
check_numeric_vector()
,
check_probability_vector()
,
chunk_vector()
,
match_numerics()
,
permutations()
,
split_vector_at()
,
subsets()
,
vector_occurrence()
v <- 1:3
x <- 0
insert_vector_entry(v, x, 0)
insert_vector_entry(v, x, 1)
insert_vector_entry(v, x, 2)
insert_vector_entry(v, x, 3)
### also multiple positions
insert_vector_entry(v, x, 0:3)
### also trivial case
insert_vector_entry(integer(), integer(), integer())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.