replacechar: Replace a character in a string with a new character

View source: R/clanToolsFunctions.R

replacecharR Documentation

Replace a character in a string with a new character

Description

Find the most common element(s) in a single vector Many elements may occur the same number of times (equal to the max number of times). For example, if a vector of unique elements are given to the function, then all elements occur exactly once. To limit the number of elements that is returned, a value for max.number.of.elements may be given. This functions also handles NULL vectors and NA-values.

Usage

replacechar("AbE","b","B")

Arguments

x

is the string

char

is the character to be replaced

newchar

is the new character

Value

The string with the replaced character

Author(s)

Claus E. Andersen


claus-e-andersen/clanTools documentation built on June 2, 2024, 6:23 a.m.