powered by
This function allows trimming/removing redundant text-fragments from right side.
.trimRight(x, minNchar = 1, silent = TRUE, debug = FALSE, callFrom = NULL)
This function returns a modified character vector
character vector to be treated
(integer) minumin number of characters that must remain
(logical) suppress messages
(logical) display additional messages for debugging
(character) allow easier tracking of messages produced
trimRedundText; Inverse : Find/keep common text keepCommonText; you may also look for related functions in package stringr
trimRedundText
keepCommonText
txt1 <- c("abcd_ccc","bcd_ccc","cde_ccc") .trimRight(txt1)
Run the code above in your browser using DataLab