R: sf_assign

sf_assign {stringfish} | R Documentation

## sf_assign

### Description

Assigns a new string to a stringfish vector or any other character vector

### Usage

    sf_assign(x, i, e)

### Arguments

`x` | the vector
`i` | the index to assign to
`e` | the new string to replace at i in x

### Details

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.

### Value

No return value, the function assigns an element to an existing stringfish vector

### Examples

    x <- sf_vector(10)
    sf_assign(x, 1, "hello world")
    sf_assign(x, 2, "another string")

[Package stringfish version 0.12.1 Index]