I want to add white space after three character in a string. I used the following code which works well. I wonder if there is any other simple way to accomplish the same task
library(stringi)
Test <- "3061660217"
paste(
stri_sub(str = Test, from = 1, to = 3)
, stri_sub(str = Test, from = 4)
, sep = " "
)
[1] "306 1660217"