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