0

I have a problem in structuring a txt dataset, which is about the news from different fields and time, looking like this:

court agrees to expedite n.f.l.'s appeal  
the decision means a ruling could be made nearly two months before the regular season begins, time for the sides to work out a deal without delaying the season.
http://feeds1.nytimes.com/~r/nyt/rss/sports/~3/nbjo7ygxwpc/04nfl.html               
0    
04 May 2011 07:39:03
nyt   
sport

investing: can you profit in agricultural commodities?  
bad weather is one factor behind soaring food prices. can you make hay with farm stocks? possibly: but be prepared to harvest gains on a moment's ...  
http://rssfeeds.usatoday.com/~r/usatodaycommoney-topstories/~3/qbhb22sut9y/2011-05-19-can-you-make-gains-in-grains_n.htm  
1   
20 May 2011 15:13:57   
ut  
business

no tsunami but fifa's corruption storm rages on   
though jack warner's threatened soccer "tsunami" remains stuck in the doldrums, the corruption storm raging around fifa shows no sign of abating after another extraordinary week for the game's governing body.   
2    
07 Jun 2011 17:54:54    
reuters   
sport   

Now I am trying to use R to read this dataset as different variables in columns. The first line of each is "Topic", then "Description", "Link", "ID", "Data&Time", "City", and last one is "Fields". The file contains thousands of rows and many of them have missing variables.

I really don't know where and how to start it. Hope anyone can help me!

Thomas
  • 43,637
  • 12
  • 109
  • 140
  • 1
    Is each item on a separate line as you seem to indicate in your question? If so, please format your post accordingly. When there is missing data, is there a blank line? How does it show up? – A5C1D2H2I1M1N2O1R2T1 Sep 28 '13 at 05:06
  • Sorry I just found out my previous post was kinda messy. I've edited it. So basically each line should be ordered by "Topic", "Description", "Link", "ID", "Data&Time", "City", and last one is "Fields". But when there is a missing value, it won't leave a blank but just skip it to the next variable. For instance, when there is no "Link" line, the "ID" line will appear right after the "Description" line. – Yu Hua Cheng Sep 28 '13 at 18:11

0 Answers0