Learn R Programming

wrMisc (version 1.15.3.1)

.trimRight: Trim From Right Side

Description

This function allows trimming/removing redundant text-fragments from right side.

Usage

.trimRight(x, minNchar = 1, silent = TRUE, debug = FALSE, callFrom = NULL)

Value

This function returns a modified character vector

Arguments

x

character vector to be treated

minNchar

(integer) minumin number of characters that must remain

silent

(logical) suppress messages

debug

(logical) display additional messages for debugging

callFrom

(character) allow easier tracking of messages produced

See Also

trimRedundText; Inverse : Find/keep common text keepCommonText; you may also look for related functions in package stringr

Examples

Run this code
txt1 <- c("abcd_ccc","bcd_ccc","cde_ccc")
.trimRight(txt1)

Run the code above in your browser using DataLab