On Mon, 28 Jul 2008, Paulo Cardoso wrote:
When using stop clause with a condition, its documented that "If a condition object is supplied it should be the only argument, and further arguments will be ignored, with a warning".
I see no condition object in your example.
This will not be the case when running codes from Winedit or TINN?
Please give us some evidence. If you run interactively a single statement comtaining stop(), it stops execution of just that statement.
When I do something like: if(length(content[content%in%folders])!=4) stop("Execution will be interrupted") from TINN while executing an entire code R will continue reading the code anyway.
Just as will pasting multiple lines into an interactive R session -- that is intentional.
I don't know what you mean by 'TINN' and 'Winedit' (what exact program, how are you using them?) but suspect that they are working just like pasting lines into the R session, or R-for-Windows' own pager and script editor.
Is there a way to interrupt the code of being read from a text interface?
stop() breaks execution of a block of code that source()d -- maybe that is what you are looking for?
-- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ 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.