On Jun 11, 2012, at 10:06 PM, Jie Tang wrote:

hi ,R users
I read a series of file by the command shown as below.
cop_x_data<-read.table(flnm,skip=2)
the first two line of the files are headfile and I skip them.
and sometimes the original data file is null and there is no any data
in the file except for the  head information.
At this situation,my command would be in the error and tell me that
there is not data in the file and can not go on.
How can I go on read the files even if the file is null?

There are many examples in the archives that show how to recover from errors using 'tr'y and 'tryCatch'.

--
David Winsemius, MD
West Hartford, CT

______________________________________________
R-help@r-project.org 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.

Reply via email to