I am trying to pass a list element to R's str_replace function. Say I have a string: a <- 'A dog is small' and a list l <- c('big','medium') ... ... <看更多>
Search
Search
I am trying to pass a list element to R's str_replace function. Say I have a string: a <- 'A dog is small' and a list l <- c('big','medium') ... ... <看更多>
... <看更多>
str_replace seems to randomly replace the first character when trying to replace a "." (might be piping related?) strtest<-"TOP40TR. ... <看更多>
I knew that stringr::str_replace() is awesome for this sort of thing, but I hadn't quite grasped how I could target specific columns with it ... ... <看更多>
_",a) [1] "_23.456" > library(stringr) Warning message: package 'stringr' was built under R version 3.2.3 > a="123.456" > str_replace(a,". ... <看更多>