For strsplit(), note that fixed=TRUE is much faster. /HB
On Wed, Sep 24, 2008 at 9:20 AM, Mark Kimpel <[EMAIL PROTECTED]> wrote:
> I knew there HAD to be a basic function, but 'help.search("split string")'
> and 'help("string") did not find it. Thanks for the help on this elementary
> question.
>
Also one can create a text connection and read it using read.table, scan, etc.
s <- c("12;13;14", "15;16;17")
read.table(textConnection(s), sep = ";")
# or
scan(textConnection(s), sep = ";")
On Wed, Sep 24, 2008 at 12:20 PM, Mark Kimpel <[EMAIL PROTECTED]> wrote:
> I knew there HAD to be a basi
I knew there HAD to be a basic function, but 'help.search("split string")'
and 'help("string") did not find it. Thanks for the help on this elementary
question.
Mark
Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry
Indiana Uni
I have a very long list of strings. Each string actually contains multiple
values separated by a semi-colon. I need to turn each string into a vector
of the values delimited by the semi-colons. I know I can do this very
laboriously by using loops, nchar, and substr, but it is terribly slow. Is
ther