search for: dotrace

Displaying 5 results from an estimated 5 matches for "dotrace".

Did you mean: notrace
2009 Jun 12
0
.doTrace problem with eval.parent(substitute(expr)) vs. lazy evaluation of expr
Here are a couple of problems with the use of eval.parent(substitute(expr)) instead of just lazily evaluating expr in the .doTrace function used by trace. (a) In S+ I sometimes use trace() to see how long a function takes to run with a tracer expression the saves the start time and calls on.exit to report the difference between the start and end times when the trace function ends. E.g., > trace(unix, Quote({START<-pro...
2006 Nov 21
1
strange R GUI crash
Hi all, I know I shouldn't really expect the following to work, but it provokes a crash of the GUI on my computer (Win xp professional). --- >sessionInfo() Version 2.3.1 (2006-06-01) i386-pc-mingw32 attached base packages: [1] "methods" "stats" "graphics" "grDevices" "utils" "datasets" [7] "base"
2024 Apr 12
1
Debugging functions defined (locally) inside another functions
...[c(2,3, 3)]]) [[1]] `{` [[2]] print("this is g") So now we know the print statement is at location c(2,3,3,2). Set a browser call there: > trace(f, at=list(c(2,3,3,2)), tracer = quote(browser())) [1] "f" > body(f) { g <- function() { { .doTrace(browser(), "step 2,3,3,2") print("this is g") } } print("this is f") g() } Note that the "at" argument needs to be a list to drill down; if you just said at=c(2,3,3,2) it would set breakpoints at step 2 and 3. Duncan Mu...
2011 Dec 23
2
missing value where TRUE/FALSE needed
Merry Xmas to all, I am writing a function and curiously this runs sometimes on one data set and fails on another and i cannot figure out why. Any help much appreciated. If i run the code below with data <- iris[ ,1:4] The code runs fine, but if i run on a large dataset i get the following error (showing data structures as matrix is large) > str(cluster.data) num [1:9985, 1:811] 0 0 0 0
2024 Apr 12
3
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(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, debug(g) does not work as g is not a defined function in the