Search
 
SCRIPT & CODE EXAMPLE
 

R

extract first element before a character stringr

library(stringr)

df1 <- read.table(text = "ABC|DEF|GHI, ABCD|EFG|HIJK,  ABCDE|FGHI|JKL,  
                         DEF|GHIJ|KLM, GHI|JKLM|NO|PQRS, BCDE|FGHI|JKL")
#extract 1st word before |
word(df1$V1,1,sep = "|")
Comment

PREVIOUS NEXT
Code Example
R :: diff division R 
R :: dotted y intercept line in ggplot 
R :: R new column t test p-value 
R :: R grid all possibilites between two vectors 
R :: average of rows in Rstudio reduce count 
R :: take node names from nodes to edges tidygraph 
R :: ISO 2 letter country code in r 
R :: Pass argument to group_by (2) 
R :: how to combine multiple time series in r 
Rust :: random number generator in rust 
Rust :: rust create directory 
Rust :: how to split a string by spaces rust 
Rust :: rust match with enum 
Rust :: encode base64 rust 
Rust :: length of vector rust 
Rust :: uuid from string rust 
Rust :: rust•armanriazi•borrowchecker•lifetime 
Rust :: rust get char at index 
Rust :: rust from floating point to money 
Rust :: Read a floating point number from stdin 
Rust :: rust create hashmap from delimited data in string 
Rust :: bevy disable plugin 
Rust :: rust sum and average of number list 
Rust :: rust match enum 
Lua :: absolute value in lua 
Lua :: roblox make debounce 
Lua :: lua multiline string 
Lua :: error: LINK : fatal error LNK1561: entry point must be defined 
Lua :: how to print a variable in lua 
Lua :: how to end if statement roblox 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =