left: Extract the 'n' characters from the left of a string 'left'...

View source: R/left.R

leftR Documentation

Extract the n characters from the left of a string left uses a specific case of the substr function to take only the left most n characters from the input string.

Description

Extract the n characters from the left of a string left uses a specific case of the substr function to take only the left most n characters from the input string.

Usage

left(x, n)

Arguments

x

a string

n

the number of characters from the left of the string to extract

Examples

foo <- "foo"
left(foo, 2)

mike-decarlo/augmentR documentation built on March 17, 2023, 11:05 a.m.