0

I have a string column. I need to create an array of words by splitting string by " " (space). The code below works fine for single cell

array(strsplit(f2$standard_address[1], " ")[[1]] ) 

I want to do this for an entire column. I tried few apply function but not able to store them.

Can you help me create a vector field and store results there?

sfjac
  • 7,119
  • 5
  • 45
  • 69
Jaimik Jain
  • 79
  • 1
  • 4
  • 2
    `strsplit` is vectorized, no need for `sapply` or `lapply` Does `strsplit(f2$standard_address, ' ')` produce desired output? – Pafnucy May 29 '15 at 10:01
  • 1
    Remember when posting a question that it's often very useful [to provide a reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – Jota May 29 '15 at 10:46

0 Answers0