[R] Error Running arules

Stephen H. Dawson, DSL @erv|ce @end|ng |rom @hd@w@on@com
Tue Sep 6 22:45:31 CEST 2022


Thanks, Ivan. I appreciate all of your kind assistance and your 
encouragement.


*Stephen Dawson, DSL*
/Executive Strategy Consultant/
Business & Technology
+1 (865) 804-3454
http://www.shdawson.com


On 9/6/22 16:36, Ivan Krylov wrote:
> On Tue, 6 Sep 2022 15:47:20 -0400
> "Stephen H. Dawson, DSL" <service using shdawson.com> wrote:
>
>> I added the line to the top of my script:
>> traceback()
> The best way to use traceback() is to run it immediately after getting
> an error:
>
> f <- function() g()
> g <- function() h()
> h <- function() stop("I'm causing an error")
> f()
> # Error in h() : I'm causing an error
> traceback()
> # 4: stop("I'm causing an error") at #1
> # 3: h() at #1
> # 2: g() at #1
> # 1: f()
>
> Depending on how you run scripts, placing a traceback() right after the
> line that crashes may be not enough: R stops the whole execution
> process, requiring you to type traceback() manually. Alternatively,
> options(error = traceback) will run it for you every time an unhandled
> error happens, including interrupts (which is annoying).
>
> options(error = recover) will let you interactively inspect the values
> of the variables at the time of the crash. Using dump.frames (see its
> help page) will save the variables into file or global variable to
> inspect them later. I haven't seen them shared on the mailing list (too
> large?), but it could be an option. options(error = NULL) restores the
> default behaviour.
>
> When debugging is unavoidable, R Inferno
> <https://www.burns-stat.com/documents/books/the-r-inferno/> is one of
> good resources on how to do it with R code.
>
>> I ran my script with my arules code today. Now, there are no errors.
> Congratulations on having it solve itself! Let's hope the error won't
> return.
>



More information about the R-help mailing list