powered by
Assigns a new string to a stringfish vector or any other character vector
sf_assign(x, i, e)
No return value, the function assigns an element to an existing stringfish vector
the vector
the index to assign to
the new string to replace at i in x
A function to assign a new element to an existing character vector. If the the vector is a stringfish vector, it does so without materialization.
if(getRversion() >= "3.5.0") { x <- sf_vector(10) sf_assign(x, 1, "hello world") sf_assign(x, 2, "another string") }
Run the code above in your browser using DataLab