On Thu, 12 Apr 2007, Yuchen Luo wrote: > With file( ) to obtain a pointer of a file, every time we use scan ( ) to > read one row of it, the pointer will point to the next row of the file. In > the following example, d1 and d2 are obtained the same way but they > correspond to different rows of the same file because the pointer of the > file moves down a row when a row of the file is read.
Yes, as documented. Isn't that good? [...] > My question is, how to manipulate the pointer of the file further? For > example, what if I need the pointer to go back to the previous row? See ?seek, which is linked from the help page for file(). Using accurate terminology helps: file() gives you a connection. Part of a connection is two positions (one each for read and write). -- Brian D. Ripley, [EMAIL PROTECTED] 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 ______________________________________________ [EMAIL PROTECTED] 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.
