LEFT: Basic LEFT function from excel

Description Usage Arguments Value Examples

View source: R/LEFT.R

Description

It acts similiarly to Excel's LEFT function. It takes the text and gives you the amount of characters you want to get from the string.

Usage

1
LEFT(text, num_chars)

Arguments

text

the text you want to select characters from left.

num_chars

How many characters should it select?

Value

In this case we have a sentence and we want to extract first 4 characters from the sentence. Therefore we specify the argument 4 and it gives us the first word.Function will always return character class.

Examples

1
LEFT("Fear what happens",4)

Example output

[1] "Fear"

ExcelFunctionsR documentation built on July 1, 2020, 8:35 p.m.