Hi Yuchen, I'm not sure my message will help you but who knows (I'm a newbie : I discovered R one month ago).
To load data file, I use donnees<-read.table("datafile.dat", quote="\"", sep=";", dec=",", skip=18) and I don't need to tell when to stop. R knows it. Good luck, Ptit Bleu. Yuchen Luo wrote: > > Dear collegues. > I am using scan( ) to read from a table (a csv file). > I am wondering how to let the program know that the end of the file is > reached? > > Your help will be highly appreciated! > > Best Wishes > Yuchen Luo > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@stat.math.ethz.ch 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. > > -- View this message in context: http://www.nabble.com/How-to-let-the-program-know-the-end-of-a-file-is-reached--tf4346243.html#a12386085 Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@stat.math.ethz.ch 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.