On 23-08-2012, at 07:22, Doug Edmunds wrote:

> I downloaded a text file which has several lines of text before the header 
> line of the data, similar to this:
> 
> ---start---
> "Corn December 2012 (CZ2012)"
> Source:  Wikiposit Open Data via wikiposit.org 
> (http://wikiposit.org/uid?FUTURE.CZ2012)
> Update: 
> http://wikiposit.org/w?action=dl&dltypes=comma%20separated&sp=daily&uid=FUTURE.CZ2012
> 
> Date,Open,High,Low,Settle,Volume,OpenInt,
> 08-Jun-2009,0,469.5,469.5,469.5,0,0,
> 09-Jun-2009,0,476.75,469.5,476.75,0,0,
> ...
> 
> After I download the file using R, how do I remove the lines of text
> that appear before the header line (Date, Open, ...)?
> 

?read.table

Use the argument skip of the read.XXX functions (XXX=table, csv,csv2 etc.)

Berend

______________________________________________
R-help@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.

Reply via email to