Thanks to Wensui Liu and Jim Holtman for responses. Using sed was a good,
quick (non-R) suggestion. Thanks! Zev
Wensui Liu wrote:
if i were you, i probably will use 1 line of sed to do such task
instead of R to insert headers in the file.
On Thu, Apr 15, 2010 at 10:34 AM, Zev Ross [1] w
if i were you, i probably will use 1 line of sed to do such task
instead of R to insert headers in the file.
On Thu, Apr 15, 2010 at 10:34 AM, Zev Ross wrote:
> All,
>
> I have a 30 million record text file without header information. I would
> like to add a header to this file without reading it
You also might take a look at using file.append to speed up the process.
On Thu, Apr 15, 2010 at 10:34 AM, Zev Ross wrote:
> All,
>
> I have a 30 million record text file without header information. I would
> like to add a header to this file without reading it first. Is this
> possible? The cod
If you want to place the header at the beginning of the file, then you have
to read/write the entire file to get that first line in.
On Thu, Apr 15, 2010 at 10:34 AM, Zev Ross wrote:
> All,
>
> I have a 30 million record text file without header information. I would
> like to add a header to thi
All,
I have a 30 million record text file without header information. I would
like to add a header to this file without reading it first. Is this
possible? The code below does what I want except that the readLines
portion takes quite a long time. Is there a way around reading the
lines? I'm w
5 matches
Mail list logo