有帮助吗?

How to remove unique characters within strings in R?

R ProgrammingServer Side ProgrammingProgramming

We can achieve this by using gsub function

Example

> x <- c("14870e", "16578e", "302e47", "e95748")
> x
[1] "14870e" "16578e" "302e47" "e95748"
> gsub("e", "", x)
[1] "14870" "16578" "30247" "95748"
raja
Published on 06-Jul-2020 18:03:18
Advertisements
有帮助吗?
不隶属于 Tutorialspoint
scroll top