[Rd] head() for files

2008-07-25 Thread Gorjanc Gregor
Hi! I was thinking about using the head and tail functions also for files i.e. show me the first/last few lines of a file. For example: zz - file(ex.data, w) # open an output file connection cat(TITLE extra line, 2 3 5 7, , 11 13 17, file = zz, sep = \n) cat(One more line\n, file = zz)

Re: [Rd] head() for files

2008-07-25 Thread Duncan Murdoch
On 25/07/2008 7:30 AM, Gorjanc Gregor wrote: Hi! I was thinking about using the head and tail functions also for files i.e. show me the first/last few lines of a file. For example: zz - file(ex.data, w) # open an output file connection cat(TITLE extra line, 2 3 5 7, , 11 13 17, file = zz, sep

Re: [Rd] head() for files

2008-07-25 Thread Gorjanc Gregor
I was thinking about using the head and tail functions also for files i.e. show me the first/last few lines of a file. For example: zz - file(ex.data, w) # open an output file connection cat(TITLE extra line, 2 3 5 7, , 11 13 17, file = zz, sep = \n) cat(One more line\n, file = zz)