[R] How to parse text file into a table?

Daren Tan darentan76 at gmail.com
Sun Feb 22 14:45:59 CET 2009

I am given a text file of records to be converted into a table format.
I have searched related topics or packages, but can't find any similar
cases. Please help.

Sample record is given below. Take note the last element doesn't have
a semi colon.

###---------Start of record----------------------

Name : John
Height: 170cm
Weight  : 70kg
Age: 30

Status: Married
Children: 2

Employment  Engineer

###---------End of record-----------------------

Table format should have this header
Name	Height	Weight	Age	Status	Children	Employment

More information about the R-help mailing list