[R] split a row into multiple columns

From: Kevin Burnham <kburnham_at_gmail.com>
Date: Thu, 03 Jun 2010 12:30:51 -0500


Would somebody please help me break this row:

"Main Group\t1000\tMP Test\tMP Test, 1\tAudio (1, f1-qaddara.aiff)\tl
(target is right word)\tl\tPressed\tl (target is right word)\tC\t3111\t\t\t\t\t"

into multiple columns along the \t separator?

When I try the strsplit (x,"\t") command I get:

[[1]]

 [1] "Main Group"                 "1000"                       "MP
Test"                    "MP Test, 1"                 "Audio (1,
f1-qaddara.aiff)"
 [6] "l (target is right word)" "l"
"Pressed" "l (target is right word)"
"C"
[11] "3111"                       ""

"" "" ""

Which which is closer to what I need, but still not in columns.

Thanks,
Kevin

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 03 Jun 2010 - 17:34:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 03 Jun 2010 - 19:50:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive