[R] How to read a long string of characters as a vector

John Zhang jzhang at jimmy.harvard.edu
Thu Feb 14 18:55:52 CET 2002


Sandra,

paste(unlist(strsplit("yourstring", "")), sep = "", collapse = ",") will give 
you y,o,u,r,s,t,r,i,n,g.

Jianhua

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list