Displaying 20 results from an estimated 2000 matches similar to: "how to debug (mtrace) a function defined inside a function?"
2004 Sep 27
1
mtrace and debug
Hello,
pointed to the article "Debugging Without (Too Many) Tears" of Mark
Bravington in Rnews Vol 3/3, December 2003 there is a package mvbutils
mentioned.
So I started to install this package from within R
> install.package(mvbutils)
I receive an error essage that this package is not found! Is due to a
merge,removal or rename of this package?
When I try to follow this
2006 Oct 18
1
strange error in mtrace
Dear useRs,
I am experiencing very strange error with Mark Bravington's package "debug".
I haven't seen them before.
Here is the sample session
> library(debug)
Loading required package: mvbutils
MVBUTILS: no "tasks" vector found in ROOT
Loading required package: tcltk
Loading Tcl/Tk interface ... done
> x<-function() return(1)
> mtrace(x)
> x()
Error
2011 Apr 07
2
How to debug reference classes?
How do you debug methods of a reference class? I've been using mtrace, which
is excellent, but i cannot figure out how to mtrace a reference class
method. Maybe there is some other way to debug these, for example with
ordinary trace? for now i am only able to use options(error=recover), which
is not giving me idea where exactly in the code i am once i am stopped on an
error.
--
View this
2007 Apr 04
1
Need mtrace (malloc debugging) help
Hi all,
I am using "mtrace" malloc debugging utility to trace memory leaks in my
application.
I followed following steps:
1. Added mtrace() function in the beginning of my main function.
2. exported the MALLOC_TRACE environment variable.
$ export MALLOC_TRACE=memory.log
3. Run the program
4. trace the program for memory leaks.
$ mtrace <myprogram> $MALLOC_TRACE
But In
2012 Jan 24
1
debug package: mtrace fails
Hi all,
Since three month ago I started working with R professionally, I never did
it before, so I am such a newbie.
I am having some problems using the 'debug' package. I love this package,
but most of the times I wanna use it it just fails :P
When typing at prompt 'mtrace(myfunct)' most of the times I get the
following error:
"Error in x[[i]] : subscript out of
2011 Dec 22
1
mtrace function
I use windows xp. When trying to use the function mtrace from package debug
the window that should open with the function to be debugged do not show
any text at all. It shows only a part of my desktop. Does anyone know why.
Is there any imcompatibility between windows xp and debug package.
Thanks in advance.
Enio Jelihovschi
[[alternative HTML version deleted]]
2004 Mar 25
1
mlocal/mtrace inside a loop
Hello
I need some help in figuring Bravington’s debugger
out.
Ok
I have 2 functions, fun1 and fun2 saved in a ASCII
file say filename is funs.
Fun1 has a loop which calls fun2, fun2 has a loop
which fails and I need to find out the value of the
variables of the fun2 and fun1 loops at the specific
iteration that fails. Both fun1 and fun2 loops will
iterate thousands of times so line by line debug
2007 May 12
1
mtrace() fails
I find the R debug package very useful. I've installed and used it on
several of the machines I use, without problems, but on one machine I
get the following error:
Loading required package: mvbutils
Loading required package: utils
MVBUTILS: no "tasks" vector found in ROOT
Loading required package: tcltk
Loading Tcl/Tk interface ... done
[Previously saved
2010 May 04
0
masking of objects between mtrace() and getYahooData()
I am using getYahooData from TTR to get daily data. When i do it standalone,
it is fine. It also works fine inside my code. However, when i run code
inside mtrace(), i always get the following error:
Error in xts(cbind(adj[[1]], adj[[2]]), index(obj)):
order.by requires an appropriate time-based object
After a lot of hand wringing, it looks to me that it happens because index
in xts masks
2009 Apr 13
0
debug/mtrace problem
Hello,
In the past I have used intensively the mtrace function from the debug
package, but now with my actual version of R(2.8.1) , it is impossible
to use it anymore.
I've updated all my packages, and I don't understand how solve this
problem...
Here is an example code :
> foo<-function(){cat("Test Function")}
> mtrace(foo)
> foo() # A tcl/tk windows open
2012 Jan 06
0
graphic problem: transparent window when starting mtrace() from package debug
Hi Jannis
[I'm the author of package debug... I know this is 6 months after your query, sorry-- but I don't subscribe to R-help, and you didn't post to the maintainer! I'm primarily sending this to close off the thread.]
> when I use the package debug, mark a function with mtrace() and enter
> into the browser like mechanism of debug a window displaying the code of
>
2011 Jul 23
0
graphic problem: transparent window when starting mtrace() from package debug
Deal R
,
when I use the package debug, mark a function with mtrace() and enter
into the browser like mechanism of debug a window displaying the code of
the marked function with the current line highlighted usually appears.
When I use GUIs other than ess or the standard R console sometimes this
window is totally transparent so it is not possible to see any code in
it. After closing/resizing
2006 Oct 12
1
debug package in R 2.4.0
Hi.
I recently upgraded to R version 2.4.0, and I have found that the
"debug" package no longer works. In particular, when I try to debug a
function, I get the following error message:
Error in attr(value, "row.names") <- rlabs :
row names must be 'character' or 'integer', not 'double'
I have, of course, taken all the necessary preceding
2010 Jan 01
1
Questions bout SVM
Hi everyone,
Can someone please help me in these questions?:
1)if I use crossvalidation with svm, do I have to use this equation to calculate RMSE?:
mymodel <- svm(myformula,data=mydata,cross=10)
sqrt(mean(mymodel$MSE))
But if I don’t use crossvalidation, I have to use the following to calculate RMSE:
mymodel <- svm(myformula,data=mydata)
mytest
2018 May 18
3
Exporting to text files
I have dose response data analyzed with the package 'drc'.
'summary(mymodel)' prints my kinetic parameters. I want
that text in an ASCII text file. I want to get exactly what I
would get if I copied and pasted from the terminal window.
I've read the documentation on data export to text files here:
2008 Apr 17
1
How to extract vectors from an arima() object and into a data frame?
This should be very easy, but alas, I'm very new to R. My end goal is to
calculate p-values from arima().
Let's say I just ran this:
> MyModel <- arima(y[1:58], order=c(1,0,0), xreg=MyData[1:58,7:14],
> method="ML")
> MyModel
And I see:
arima(x = y[1:58], order = c(1, 0, 0), xreg = MyData[1:58, 7:14], method =
"ML")
Coefficients:
ar1
2006 Nov 16
2
dynamically adding static (class) methods to a class
Hello again,
I guess this is more of a Ruby question, but here goes anyways...
I want to intercept all calls to non existent class methods and then
call an existing class method with the non existent name.
In code...
class MyModel < ActiveRecord::Base
def MyModel.method_missing(symbol, *args)
MyModel.func(symbol.id2name)
end
def MyModel.func(func_called)
puts "You
2018 May 18
0
Exporting to text files
?sink
On May 18, 2018 9:47:25 AM PDT, Ed Siefker <ebs15242 at gmail.com> wrote:
>I have dose response data analyzed with the package 'drc'.
>'summary(mymodel)' prints my kinetic parameters. I want
>that text in an ASCII text file. I want to get exactly what I
>would get if I copied and pasted from the terminal window.
>
>I've read the documentation on
2006 May 04
1
Instance or local vars for field helpers in partial template
I''m getting confused.
If I have a view (.rhtml), I can use a field helper like:
<%= text_field :mymodel, :attribute %>
This uses the value from @mymodel.attribute
Now, if I am rendering a template normally (i.e. not partial), I would
expect @mymodel to be a model object defined as an instance variable in
the controller.
However, if I am rendering a partial template, I
2007 Jan 02
4
Am I missing something about debugging?
I would like to be able to trace execution into calls below the current
function, or to follow execution as calls return. This is roughly the
distinction between "step" and "next" in many debuggers.
I would also like to be able to switch to a location further up the call
stack than the location at which I enter the debugger, to see the
context of the current operations.
Are