Answers for "r remove all string before : in r data frame"

R
0

r remove all string before : in r data frame

> x <- 'aabb.ccdd'
> sub('.*', '', x)
[1] ""
> sub('bb.*', '', x)
[1] "aa"
> sub('.*bb', '', x)
[1] ".ccdd"
> sub('\\..*', '', x)
[1] "aabb"
> sub('.*\\.', '', x)
[1] "ccdd"
Posted by: Guest on May-30-2020

Code answers related to "r remove all string before : in r data frame"

Browse Popular Code Answers by Language