SUBSTITUTE: Basic SUBSTITUTE function from excel

Description Usage Arguments Value Examples

View source: R/SUBSTITUTE.R

Description

It acts similiarly to Excel's SUBSTITUTE function. If you want to substitute the characters by certain characters you should use this function.

Usage

1
SUBSTITUTE(text, old_text, new_text)

Arguments

text

Where should it substitute the characters

old_text

Which text should it substitute

new_text

What should it substitute with.

Value

In this example we take text "CRAN", we take the old text "RAN" and replace it with "out" which in return gives us "Cout". Function will always return character class.

Examples

1
SUBSTITUTE("CRAN","RAN","out")

Example output

[1] "Cout"

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