Re: [R] warning messages

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Mon 26 Jun 2006 - 01:06:23 EST

Try this:

f <- function() {

	cat("c to continue, anything else to quit: ")
	x <- readline()
	if (x != "c") stop("User forced exit")
	# rest of function

}

f()

On 6/25/06, Matthew Bridgman <m.bridgman@sbcglobal.net> wrote:
> I want to put warning messages into some of my functions to remind
> myself to change the output file names each time I run them. Is there a
> way to do this that will allow me to respond to the warning message
> (i.e. "continue function" or "cancel")?
>
> Thanks,
> Matt
>
> ______________________________________________
> 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
>



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 Received on Mon Jun 26 01:09:35 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 26 Jun 2006 - 02:13:12 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.