Hi, In the following code, I got an error meesage if an input file is empty, and the program stopped running. Could someone to tell me how to handle this problem. I want the program to keep running. Thanks. for i in [1:3] { file=paste("file", i, ".dat") x <- read.data(file) x(11) plot(x); dev.off() }