Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

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"
Source by stevencarlislewalker.wordpress.com #
 
PREVIOUS NEXT
Tagged: #remove #string #data #frame
ADD COMMENT
Topic
Name
3+6 =