get_prefix: Strip out the first several characters from a column

View source: R/bls_utils.R

get_prefixR Documentation

Strip out the first several characters from a column

Description

Strip out the first several characters from a column

Usage

get_prefix(.x, .col, .len)

Arguments

.x

the input data frame

.col

the character column to extract the prefix from

.len

the length of the prefix

Value

a new data frame with a column, “prefix“ inserted before “.col“

Examples

hiRx:::get_prefix(
    tibble::tribble(~Text, "hello", "world"),
    Text,
    3
)

higherX4Racine/hiRx documentation built on Nov. 18, 2024, 10:20 a.m.