[R] Error Awareness

Jeff Newmiller jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Thu Dec 23 18:17:57 CET 2021


You still are not exhibiting signs of understanding Bert's response, and your question is vague, particularly to the extent that it could be pertinent to the R language (and therefore to the topic of this list). R itself just raises an error condition that custom tryCatch or default handling will deal with. If you run the script in a logging context (as defined by a non-R, operating-system-specific tool) then whatever error was printed by R to stdout or stderr will be in that log. If you want some different form communication then you will need to use tryCatch and initiate that effort. But since R itself doesn't know how you are running it (cron? CGI? Windows Task Manager? self-implemented socket monitoring?) it is up to you to deal with that.

If you have a more focused question (e.g. how can I send an email or text) then there may well be a package for that, but you can find such things yourself with a search engine and discussion of how to use them is almost certainly off-topic here (read the Posting Guide).

On December 23, 2021 8:16:58 AM PST, "Stephen H. Dawson, DSL via R-help" <r-help using r-project.org> wrote:
>Hi Bert,
>
>
>Thanks for the reply.
>
>The use case I presented involves working code, not diagnosing a script 
>in development.
>
>The concern is running a script where something changes outside of the 
>script, as I stated. An example of a change is a data source changing 
>perhaps the columns in the data source, or even changing the spelling of 
>a column. The point is something changes.
>
>The question then becomes how to be aware of the change when the reset 
>of the script runs fine, as I presented.
>
>Think of having a script running daily where you are not running it 
>manually. How do you know there are errors in the script processing at 
>this point?
>
>Does this question now make more sense?
>
>
>*Stephen Dawson, DSL*
>/Executive Strategy Consultant/
>Business & Technology
>+1 (865) 804-3454
>http://www.shdawson.com <http://www.shdawson.com>
>
>
>On 12/23/21 10:49 AM, Bert Gunter wrote:
>> ?tryCatch
>>
>> This list is not meant for tutorials. A web search on "find errors in
>> R code" brought up what appeared to be many resources to address your
>> question. Please make use of such resources before posting here. Also,
>> please read and follow the posting gui)de linked below to find out
>> what sort of help you can expect (and have already received here.
>>
>> Cheers,
>> Bert Gunter
>>
>> "The trouble with having an open mind is that people keep coming along
>> and sticking things into it."
>> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>>
>> On Thu, Dec 23, 2021 at 3:14 AM Stephen H. Dawson, DSL via R-help
>> <r-help using r-project.org> wrote:
>>> Hi,
>>>
>>>
>>> I am thinking about awareness of errors when an R script runs.
>>>
>>> My concern is I have an error-free script. I run it for months on end
>>> without problems. Then, something changes somewhere causing an error. My
>>> wonderment is how R will tell me I had an error in the script, but the
>>> rest of the script ran without impairment.
>>>
>>> QUESTIONS
>>> What are some of the more helpful options available to an R developer to
>>> capture errors in a script run?
>>>
>>> What are some of the best processes to implement these more helpful options?
>>>
>>>
>>> Thanks,
>>> --
>>> *Stephen Dawson, DSL*
>>> /Executive Strategy Consultant/
>>> Business & Technology
>>> +1 (865) 804-3454
>>> http://www.shdawson.com <http://www.shdawson.com>
>>>
>>> ______________________________________________
>>> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>> 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.
>
>______________________________________________
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>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.

-- 
Sent from my phone. Please excuse my brevity.



More information about the R-help mailing list