similar to: Inserting and testing revised functions in a package

Displaying 20 results from an estimated 1500 matches similar to: "Inserting and testing revised functions in a package"

2018 Jan 29
2
bug [methods]: double execution of `insertSource` within the same session does not work
Hello everyone, I hope this reaches someone at all. It's my first bug report to the R-core, and, apparently, bugzilla is locked from new reports for now. I was using `methods::insertSource` to debug and successfully fix another package, until it suddenly stopped working. I figured out, that it is because I am using it on the same function multiple times within one session. It also produces
2018 Jan 29
0
bug [methods]: double execution of `insertSource` within the same session does not work
Thanks, I will fix this. On Mon, Jan 29, 2018 at 8:06 AM, Demetrio Rodriguez T. < demetrio.rodriguez.t at gmail.com> wrote: > Hello everyone, > > > I hope this reaches someone at all. It's my first bug report to the R-core, > and, apparently, bugzilla is locked from new reports for now. > > I was using `methods::insertSource` to debug and successfully fix another
2007 Dec 06
1
trace() problems (PR#10498)
trace() seems to be broken in 2.6.1 and R-devel: Try the example from the ?debug man page: > library(methods) > trace("plot", browser, exit=browser, signature = c("track", + "missing")) Error in getFunction(what, where = whereF) : no function "plot" found Okay, it's just an example that doesn't work. Let's try a simpler one,
2004 Jul 14
2
tracing something in a namespace (PR#7091)
# Your mailer is set to "none" (default on Windows), # hence we cannot send the bug report directly from R. # Please copy the bug report (after finishing it) to # your favorite email program and send it to # # r-bugs@r-project.org # ###################################################### > x <- rnorm(10) > y <- 1:10 > xyplot(y ~ x) >
2009 Jun 03
1
Using constrOptim() function
I have a function myFunction(beta,x) where beta is a vector of coefficients and x is a data frame (think of it as a matrix). I want to optimize the function myFunction() by ONLY changing beta, i.e. x stays constant, with 4 constraints. I have the following code (with a separate source file for the function): rm(list=ls()) source('mySourceFile')
2019 Jun 28
0
methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error
>>>>> Henrik Bengtsson >>>>> on Thu, 27 Jun 2019 16:00:39 -0700 writes: > Using: > > untrace(methods::conformMethod) > at <- c(12,4,3,2) > str(body(methods::conformMethod)[[at]]) > ## language omittedSig <- omittedSig && (signature[omittedSig] != "missing") > cc <- 0L > trace(methods::conformMethod, tracer =
2019 Jun 29
0
methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error
>>>>> peter dalgaard >>>>> on Fri, 28 Jun 2019 16:20:03 +0200 writes: > > On 28 Jun 2019, at 16:03 , Martin Maechler <maechler at stat.math.ethz.ch> wrote: > > > >>>>>> Henrik Bengtsson > >>>>>> on Thu, 27 Jun 2019 16:00:39 -0700 writes: > > > >> Using: > >> > >>
2019 Jul 04
1
methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error
In 'conformMethod', there is another instance of omittedSig & <something about signature[omittedSig]> . It just affects error message. Original: ? ? if(any(is.na(match(signature[omittedSig], c("ANY", "missing"))))) { ? ? ? ? bad <- omittedSig & is.na(match(signature[omittedSig], c("ANY", "missing"))) After r76756: ? ? if(any(iiN
2001 Oct 09
2
list of functions flagged with debug() or trace()
Hello all, Since I got no answer to my first mail, I suspect I did not formulate my question adequately, so I try again. In R, one can debug or trace a function 'foo' with debug(foo) or trace(foo), respectively. This leads to a special treatment of the function 'foo' until one enter undebug(foo) or untrace(foo). I would like to know if there is a convenient way to know at any
2019 Jun 28
2
methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error
> On 28 Jun 2019, at 16:03 , Martin Maechler <maechler at stat.math.ethz.ch> wrote: > >>>>>> Henrik Bengtsson >>>>>> on Thu, 27 Jun 2019 16:00:39 -0700 writes: > >> Using: >> >> untrace(methods::conformMethod) >> at <- c(12,4,3,2) >> str(body(methods::conformMethod)[[at]]) >> ## language omittedSig
2019 Jun 27
2
methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error
Using: untrace(methods::conformMethod) at <- c(12,4,3,2) str(body(methods::conformMethod)[[at]]) ## language omittedSig <- omittedSig && (signature[omittedSig] != "missing") cc <- 0L trace(methods::conformMethod, tracer = quote({ cc <<- cc + 1L print(cc) if (cc == 31) { ## manually identified untrace(methods::conformMethod)
2020 Aug 25
2
trace creates object in base namespace if called on function argument
Dear R-devel, I don't think this is expected : foo <- function() "hello" trace2 <- function(fun) trace(fun, quote(print("!!!"))) base::fun # Object with tracing code, class "functionWithTrace" # Original definition: # function() "hello" # # ## (to see the tracing code, look at body(object)) `untrace()` has the same behavior. This is
2019 Jun 29
0
methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error
>>>>> Martin Maechler >>>>> on Sat, 29 Jun 2019 12:05:49 +0200 writes: >>>>> Martin Maechler >>>>> on Sat, 29 Jun 2019 10:33:10 +0200 writes: >>>>> peter dalgaard >>>>> on Fri, 28 Jun 2019 16:20:03 +0200 writes: >>> > On 28 Jun 2019, at 16:03 , Martin Maechler <maechler at
2020 Aug 26
0
trace creates object in base namespace if called on function argument
Hi Tomas, The doc indeed describes `what` as "the name, possibly quote()d, of a function to be traced or untraced". This is a good argument not to change the function and make it behave more like debug. However the doc also tells us "A call to trace allows you to insert debugging code (e.g., a call to browser or recover) at chosen places in any function" and "The trace
2019 Jun 29
2
methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error
>>>>> Martin Maechler >>>>> on Sat, 29 Jun 2019 10:33:10 +0200 writes: >>>>> peter dalgaard >>>>> on Fri, 28 Jun 2019 16:20:03 +0200 writes: >> > On 28 Jun 2019, at 16:03 , Martin Maechler <maechler at stat.math.ethz.ch> wrote: >> > >> >>>>>> Henrik Bengtsson
2020 Aug 26
2
trace creates object in base namespace if called on function argument
Please note that this is documented in ?trace. "fun" is matched to what, it is a _name_ of the function to be traced, which is traced in the top-level environment. I don't know why it was designed this way, but it is documented in detail, and hence the expected behavior. Debugging is often, and also in R, implemented in the core. Tracing is implemented on top without specific
2011 Sep 17
0
Warning in 'probtrans'-function ('mstate'-package)
Dear all, in order to estimate transition-specific probabilities in a multi-state model i applied the 'probtrans()' function from the 'mstate'-package. Now, i am at loss with the following message (see attached example): Warning message: In probtrans(msf.0, predt = 0) : Negative diagonal elements of (I+dA); the estimate may not be meaningful. I am not very familiar with matrix
2019 Jul 01
1
methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true
I run checks with R-devel rev. 76756 on several of my packages which use S4, with no ill effects. With the risk of not adding much, it seems that Martin's example, which I repeat below, suggests a crossover between several "signatures" involved here - the signature of the generic, the signature of the method (the argument for setMethod()), and the signature of the function object
2015 Feb 02
0
error code 1 from Lapack routine 'dsyevr'
You can start diagnosing the problem by capturing the matrix that caused eigen() to stop. You can do this in a variety of ways; here is one trace(eigen, quote(lastEigenX <<- x)) After setting the trace, make your offending function call and after the error the global variable 'lastEigenX' will contain the bad matrix. Take the trace off of eigen untrace(eigen) If all goes
2006 Feb 02
1
Inserting svn revision into site
Hi, Say I wanted to know what svn revision a given site was using, simply from looking at the site. How could I embed that information into the page (into maybe a html comment or in the page footer)? A switchtower task? Joe