left: Function to trim n leading characters from string.

View source: R/left_right.R

leftR Documentation

Function to trim n leading characters from string.

Description

Inspired by PosgreSQL https://www.postgresql.org/docs/current/functions-string.html.

Usage

left(string, n)

Arguments

string

String of vector of strings.

n

Number of characters to be trimmed

Author(s)

Andreas Scharmueller, andschar@proton.me

Examples

v = c('1234567', 'abcdefg')
left(v, 2)


andschar/andmisc documentation built on Jan. 19, 2025, 10:46 a.m.