Loading...
#String length nchar("codiac") #Combine strings str_c("patient ", c("a", "b", "c")) #Sort values in a string x <- c("carrot", "apple", "banana") sort(x)
#String length 6 #Combine strings "patient a" "patient b" "patient c" #Sort values in a string "apple" "banana" "carrot"
R for Data Science: String Functions
Get string length
nchar(string)
Combine two strings
str_c(string1, string2)
Sort values within a string
sort(string1, string2, string3)