Ottorino, Thank you for your suggestion. I am not really looking to do any debugging, but merely to issue an informative error message and stop execution of my top-level function, called at an R terminal. See me response to David for more details...
Thank you, Aleksey On Tue, Nov 16, 2010 at 11:17 AM, ottorino <ottorino-luca.pant...@unifi.it>wrote: > Il giorno mar, 16/11/2010 alle 10.58 -0500, Aleksey Naumov ha scritto: > > for (i in 1:10) { > > if (i == 5) > > # I'd like to be able to stop right here with an error message I > > have > > complete control over > > } > > I'm far from expert, but perhaps this is near what you are looking for > > for(i in 1:10){ > if (i == 5) {browser()} > print("anything")} > > Browser stop the execution and allows you to indagate about > > -- > Ottorino-Luca Pantani, Università di Firenze > Dip.to di Scienze delle Produzioni Vegetali, > del Suolo e dell'Ambiente Forestale (DiPSA) > P.zle Cascine 28 50144 Firenze Italia > Ubuntu 10.04 -- GNOME 2.30.2 > GNU Emacs 23.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version > 2.18.0) > ESS version 5.11 -- R 2.12.0 > > [[alternative HTML version deleted]]
______________________________________________ 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.