left: Left substring function.

View source: R/left.R

leftR Documentation

Left substring function.

Description

Takes a string or numeric value and subsets out the left n characters.

Details

A simple function that extracts the left number of specified characters from a string or numeric value.

Output

The returned output will be same class as the input.

Usage

left(x, n)

Arguments

x

numeric value or string.

n

numeric. The number of characters to extract from the left side.

Author(s)

Nicholas Carey - nicholascarey@gmail.com

See Also

right

Examples

left("some text", 4)
left(123456, 4)


nicholascarey/caRey documentation built on Sept. 30, 2023, 3:47 a.m.