Re: [R] Substring and strsplit

2006-09-01 Thread Prof Brian Ripley
On Wed, 30 Aug 2006, Hans-Joerg Bibiko wrote: If you are using 'only' English then str - dog strsplit(str,NULL)[[1]] works perfectly and it is fast. It does also work 'perfectly' and fast in 'Unicode' in all major European and CJK languages (and many others): extending the iconv example

Re: [R] Substring and strsplit

2006-09-01 Thread Hans-Joerg Bibiko
On 1 Sep 2006, at 08:22, Prof Brian Ripley wrote: On Wed, 30 Aug 2006, Hans-Joerg Bibiko wrote: If you are using 'only' English then str - dog strsplit(str,NULL)[[1]] works perfectly and it is fast. It does also work 'perfectly' and fast in 'Unicode' in all major European and CJK

Re: [R] Substring and strsplit

2006-08-30 Thread Dimitris Rizopoulos
Web: http://med.kuleuven.be/biostat/ http://www.student.kuleuven.be/~m0390867/dimitris.htm - Original Message - From: Erin Hodgess [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Wednesday, August 30, 2006 12:25 AM Subject: [R] Substring and strsplit Dear R People: I am

Re: [R] Substring and strsplit

2006-08-30 Thread Hans-Joerg Bibiko
://med.kuleuven.be/biostat/ http://www.student.kuleuven.be/~m0390867/dimitris.htm - Original Message - From: Erin Hodgess [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Wednesday, August 30, 2006 12:25 AM Subject: [R] Substring and strsplit Dear R People: I am trying to split

[R] Substring and strsplit

2006-08-29 Thread Erin Hodgess
Dear R People: I am trying to split a character vector into a set of individual letters: Ideal: x3 - c(dog) d o g I tried the following: strsplit(x3) Error in strsplit(x3) : argument split is missing, with no default strsplit(x3,1) [[1]] [1] dog I know that this is incredibly simple, but

Re: [R] Substring and strsplit

2006-08-29 Thread Thomas Lumley
On Tue, 29 Aug 2006, Erin Hodgess wrote: Dear R People: I am trying to split a character vector into a set of individual letters: Ideal: x3 - c(dog) d o g I tried the following: strsplit(x3) Error in strsplit(x3) : argument split is missing, with no default strsplit(x3,1) [[1]] [1]

Re: [R] Substring and strsplit

2006-08-29 Thread jim holtman
Use '' as parameter to strsplit x3 - 'dog' strsplit(x3, '') [[1]] [1] d o g On 8/29/06, Erin Hodgess [EMAIL PROTECTED] wrote: Dear R People: I am trying to split a character vector into a set of individual letters: Ideal: x3 - c(dog) d o g I tried the following: strsplit(x3)