| To: | S-News <s-news@lists.biostat.wustl.edu> |
|---|---|
| Subject: | Splitting a string into a vector of strings |
| From: | Thom Burnett <Thom.Burnett@cognigencorp.com> |
| Date: | Tue, 24 May 2005 11:00:11 -0400 |
| User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 |
What's the quick and easy way to make
a <- "AB, ABC, FG, HIJKL, M"
into
b <- c("AB", "ABC", "FG", "HIJKL", "M")
I haven't yet seen this at all using match , scan, regexpr, etc.
I know that I can locate the ',' and then loop to call substring but
that seems unecessarily complicated.
Thom |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Sum of dependent and non-identically distributed Bernoulli's, Spencer Graves |
|---|---|
| Next by Date: | Re: Splitting a string into a vector of strings, Thom Burnett |
| Previous by Thread: | New to S-Plus and simple question (I hope), David Kaplan |
| Next by Thread: | Re: Splitting a string into a vector of strings, Thom Burnett |
| Indexes: | [Date] [Thread] [Top] [All Lists] |