Re: [R] Debugging functions defined (locally) inside another functions

2024-04-12 Thread Iago Giné Vázquez
Thanks a lot both Duncan and Ivan, I will keep that example in mind, Duncan, great! Best regards, Iago De: Duncan Murdoch Enviat el: divendres, 12 d�abril de 2024 15:36 Per a: Iago Gin� V�zquez ; r-help@r-project.org Tema: Re: [R] Debugging functions defined

Re: [R] Debugging functions defined (locally) inside another functions

2024-04-12 Thread Duncan Murdoch
On 12/04/2024 8:15 a.m., Iago Giné Vázquez wrote: Hi all, I am trying to debug an error of a function g defined and used inside another function f of a package. So I have f <- function(whatever){ ... g <- function(whatever2){ ... } ... } If I wanted to debug some thing

Re: [R] Debugging functions defined (locally) inside another functions

2024-04-12 Thread Ivan Krylov via R-help
В Fri, 12 Apr 2024 12:53:02 + Iago Giné Vázquez пишет: > How should I call trace() if f was a function? Let the tracer be quote(debug(g)) and use as.list(body(f)) to determine where it should be injected: f <- function() { message('exists("g") so far is ', exists('g')) g <- function() {

Re: [R] Debugging functions defined (locally) inside another functions

2024-04-12 Thread Iago Giné Vázquez
a call to debug(g) after it's created. How should I call trace() if f was a function? Best regards, Iago De: Ivan Krylov Enviat el: divendres, 12 d��abril de 2024 14:38 Per a: Iago Gin�� V��zquez A/c: r-help@r-project.org Tema: Re: [R] Debugging functions defined

Re: [R] Debugging functions defined (locally) inside another functions

2024-04-12 Thread Ivan Krylov via R-help
В Fri, 12 Apr 2024 12:15:07 + Iago Giné Vázquez пишет: > f <- function(whatever){ >... >g <- function(whatever2){ > ... >} >... > } > > If I wanted to debug some thing directly inside f I would do > debug(f). But this does not go inside g code. On the other hand, >

Re: [R] Debugging functions defined (locally) inside another functions

2024-04-12 Thread Iago Giné Vázquez
14:15 Per a: r-help@r-project.org Tema: [R] Debugging functions defined (locally) inside another functions Hi all, I am trying to debug an error of a function g defined and used inside another function f of a package. So I have f <- function(whatever){ ... g <- function(

[R] Debugging functions defined (locally) inside another functions

2024-04-12 Thread Iago Giné Vázquez
Hi all, I am trying to debug an error of a function g defined and used inside another function f of a package. So I have f <- function(whatever){ ... g <- function(whatever2){ ... } ... } If I wanted to debug some thing directly inside f I would do debug(f). But this does not