Search
 
SCRIPT & CODE EXAMPLE
 

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"
Comment

PREVIOUS NEXT
Code Example
R :: r - transform as factor 
R :: r - extracting specific columns from a data frame 
R :: r remove row names 
R :: regex in r 
R :: r ddply 
R :: libpath r 
R :: na by column r 
R :: r ggplot stacked bar labels 
R :: create vector in r 
R :: mean in r 
R :: regression in r with many variables 
R :: covert -Inf to 0 r 
R :: color code in R 
R :: Remove specific data frames from R 
R :: how to remove columns in a table in r 
R :: How to extract NA´s from a column? in R 
R :: logistic distribution CDF in r 
R :: Use regex to extract row in R (solution 1) 
R :: get plot title over two lines R 
R :: find sys date in R 
R :: geom_abline vertical line 
R :: grep string that ends with R 
Rust :: rust random number in range 
Rust :: remove file rust 
Rust :: rust write to file 
Rust :: rust new vec 
Rust :: get the temp directory rust 
Rust :: rust vec of generics types 
Rust :: rust Pause execution for several seconds 
Rust :: rust•armanriazi•borrowchecker•ownership 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =