Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Sep 19th, 2018 69 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. Mytextsample <- "aaaaabb cccdddd eee adssdada ooeoeo ososs ksdkd
  2.   ooeresso osososososos krrr dkdkkd odlcjs kdcmcmc ddddd dmssss"
  3.  
  4. dat <- unlist(strsplit(Mytextsample, " ")) # unlist is here to convert to a vector
  5. dat <- split(dat, ceiling(seq_along(dat)/10))
  6.  
  7. out <- sapply(dat, function(x) paste0(x, collapse = " "))
  8. out
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top