[R] Programcode and data in the same textfile
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Jun 12 15:54:55 CEST 2003
On Thu, 12 Jun 2003, Barry Rowlingson wrote:
>
> > file = tmpfile, sep="\n")
> > close(tmpfile)
> > read.table(tmpfilename, header = TRUE)
> >
>
> Eurgh! Does R clean up tempfiles by itself?
Yes!
It's a better idea to use an anonymous file connection, opened for reading
and writing. Then there is no cleaning-up to be done.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list