Hi, > match(4, c(1,2,3)) [1] NA
The above code run smoothly. It would not stop when 4 does not mach in c(1,2,3). I am wondering if there is a way to stop the code and pop up an error message immediately. This capability to stop will make debugging easier. Regards, Peng ______________________________________________ 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.