daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Sep 19th, 2018 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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