search for: getcal

Displaying 17 results from an estimated 17 matches for "getcal".

Did you mean: getacl
2012 Sep 17
2
"eval" inside a function call in connection with updating the data slot in the call of lmer
...beets) lgs <- lmer(sugpct~block+sow+harvest+(1|block:harvest), data=beets, REML=F) foo <- function(){ ## 1) beets2 <- transform(beets, yy = sugpct * yield) ma1 <- lmer(yy~block+sow+harvest+(1|block:harvest), data=beets2, REML=F) ma0 <- update(ma1, yy~.) ## 2) cl <- getCall(lgs) cl[["data"]] <- beets2 mb1 <- eval(cl) mb0 <- update(mb1, yy~.) mb0 ## 3) cl <- getCall(lgs) cl[["data"]] <- as.name("beets2") mc1 <- eval(cl) mc0 <- update(mc1, yy~.) mc0 } foo()
2017 Feb 10
2
help me understand how nounwind attribute on functions works?
On Thu, Feb 9, 2017 at 8:41 AM, Reid Kleckner via llvm-dev <llvm-dev at lists.llvm.org> wrote: > On Wed, Feb 8, 2017 at 5:45 PM, Mehdi Amini <mehdi.amini at apple.com> wrote: >> >> What isn’t clear to me still is : why shouldn't this be transitive? >> In the example you’re showing, for a caller of f() in bar, what is the >> advantage of knowing that f()
2015 Mar 22
2
robust updating methods
...frame(lm(y~log(x),data=d))) ## "y" "log(x)" So if we wanted to do something like update to "y ~ sqrt(x)", it wouldn't work ... ================== update.envformula <- function(object,...) { extras <- match.call(expand.dots = FALSE)$... call <- getCall(object) for (i in names(extras)) { existing <- !is.na(match(names(extras), names(call))) for (a in names(extras)[existing]) call[[a]] <- extras[[a]] if (any(!existing)) { call <- c(as.list(call), extras[!existing]) call <- as.call(cal...
2009 Oct 27
1
recover and "called from" information
...g() : ouch Enter a frame number, or 0 to exit 1: f() 2: g() Selection: 1 Called from: eval(expr, envir, enclos) I'm using the following heuristic to guess if this was called from recover and grab the actual call, and was wondering if something similar could/should be integrated into R: getcall <- function(){ calls <- sys.calls() calls <- calls[ -length(calls) ] funs <- sapply( calls, function(x) as.character(x)[1L] ) frames <- sys.frames() frames <- frames[ -length(frames) ] nc <- length(calls) if( nc >= 3L && identical( tail(funs, 2L ), rep(&q...
2015 Mar 24
2
robust updating methods
...)) ## "y" "log(x)" > > So if we wanted to do something like update to "y ~ sqrt(x)", it > wouldn't work ... > > ================== update.envformula <- function(object,...) { > extras <- match.call(expand.dots = FALSE)$... call <- > getCall(object) for (i in names(extras)) { existing <- > !is.na(match(names(extras), names(call))) for (a in > names(extras)[existing]) call[[a]] <- extras[[a]] if > (any(!existing)) { call <- c(as.list(call), extras[!existing]) call > <- as.call(call) } } eval(call, env=environmen...
2018 Jan 20
2
Paquete pdp
Buenas. El Paquete pdp es muy fácil de usar, pero cuando se lo aplico a mis datos me da: Error in eval(stats::getCall(object)$data) : object 'x.data' not found. Os copio abajo un ejemplo de aplicación a un RF. El mio es de un boosted regression trees (paquete gbm). No sé si esa puede ser la razón del error. En el paquete pdp no especifica que sea solo para RF, aunque en los ejemplos que encontré nu...
2012 Jan 22
1
Calling update on an lm-object inside a function
...d){ y3 <- c(1,3,3,4,6) update(mod, y3 ~ .) } Then I get foo(mm) Error in eval(expr, envir, enclos) : object 'y3' not found (because y3 is not known in the global environment - I suppose). To fix this I do foo2 <- function(mod){ y3 <- c(1,3,3,4,6) mod2 <- eval(getCall(mod)) update(mod2, y3 ~ .) } foo2(mm) Call: lm(formula = y3 ~ x) Coefficients: (Intercept) x 0.1 1.1 Question: Is this the "appropriate" way of making such a model "available" for an update inside a function, or is there a better way? I...
2015 Mar 23
0
robust updating methods
...t;y" "log(x)" > > So if we wanted to do something like update to "y ~ sqrt(x)", > it wouldn't work ... > > ================== > update.envformula <- function(object,...) { > extras <- match.call(expand.dots = FALSE)$... > call <- getCall(object) > for (i in names(extras)) { > existing <- !is.na(match(names(extras), names(call))) > for (a in names(extras)[existing]) call[[a]] <- extras[[a]] > if (any(!existing)) { > call <- c(as.list(call), extras[!existing]) >...
2007 Nov 06
4
[LLVMdev] Dynamic (JIT) type resolution
...obably can also face the problem of code optimization, where the store/load would not be next to the callback call. Will I also have these issues with 2)? I don't know if LLVM does optimization on DAG nodes. The dag nodes that I would like to generate for a llvm.loadfield.{type} would be: DAG.getCall(FieldCallback); // Or something similar, I don't know exactly the syntax ;-) DAG.getLoad(); When (if possible) can I be sure that these two instructions are next to each other in the native code? (Oh, and also, I would like codegen to not clobber caller-saved registers when doing the c...
2007 Nov 06
0
[LLVMdev] Dynamic (JIT) type resolution
...optimization, where the store/load would not be next > to > the callback call. > > Will I also have these issues with 2)? I don't know if LLVM does > optimization on DAG nodes. The dag nodes that I would like to generate > for a llvm.loadfield.{type} would be: > > DAG.getCall(FieldCallback); // Or something similar, I don't know > exactly the syntax ;-) > DAG.getLoad(); > > When (if possible) can I be sure that these two instructions are > next to > each other in the native code? > > (Oh, and also, I would like codegen to not clobber ca...
2015 Mar 27
0
robust updating methods
...uot;log(x)" > >> So if we wanted to do something like update to "y ~ sqrt(x)", it >> wouldn't work ... > >> ================== update.envformula <- function(object,...) { >> extras <- match.call(expand.dots = FALSE)$... call <- >> getCall(object) for (i in names(extras)) { existing <- >> !is.na(match(names(extras), names(call))) for (a in >> names(extras)[existing]) call[[a]] <- extras[[a]] if >> (any(!existing)) { call <- c(as.list(call), extras[!existing]) >> call <- as.call(call) } } eval(c...
2007 Nov 06
2
[LLVMdev] Dynamic (JIT) type resolution
...oad would not be next >> to >> the callback call. >> >> Will I also have these issues with 2)? I don't know if LLVM does >> optimization on DAG nodes. The dag nodes that I would like to generate >> for a llvm.loadfield.{type} would be: >> >> DAG.getCall(FieldCallback); // Or something similar, I don't know >> exactly the syntax ;-) >> DAG.getLoad(); >> >> When (if possible) can I be sure that these two instructions are >> next to >> each other in the native code? >> >> (Oh, and also, I woul...
2009 Jul 14
0
[LLVMdev] "Recursive compilation detected" and signals
...ilationCallback + 24 10 lli 0x00eebff5 X86CompilationCallback + 4170535429 11 lli 0x0863e13e llvm::CallSDNode::CallSDNode(unsigned int, llvm::DebugLoc, bool, bool, bool, llvm::SDVTList, llvm::SDValue const*, unsigned int, unsigned int) + 90 12 lli 0x08622d47 llvm::SelectionDAG::getCall(unsigned int, llvm::DebugLoc, bool, bool, bool, llvm::SDVTList, llvm::SDValue const*, unsigned int, unsigned int) + 419 13 lli 0x08648853 llvm::TargetLowering::LowerCallTo(llvm::SDValue, llvm::Type const*, bool, bool, bool, bool, unsigned int, unsigned int, bool, llvm::SDValue, std::vector&...
2018 Jan 17
4
Random Forests
Buenas tardes a todos. El paquete randomForest tiene la función treesize, que es el nº de nodos. Me dan valores realmente elevados (en torno a 1000), y eso me parece extraño. ¿sabéis si es así? Gracias, Manuel -- Dr Manuel Mendoza Department of Biogeography and Global Change National Museum of Natural History (MNCN) Spanish Scientific Council (CSIC) C/ Serrano 115bis, 28006 MADRID Spain
2011 Oct 31
0
R 2.14.0 is released
...rectory). See its help for exactly which times it sets on various OSes. o The file times reported by file.info() are reported to sub-second resolution on systems which support it. (Currently the POSIX 2008 and FreeBSD/Darwin/NetBSD methods are detected.) o New function getCall(m) as an abstraction for m$call, enabling update()'s default method to apply more universally. (NB: this can be masked by existing functions in packages.) o Sys.info() gains a euser component to report the 'effective' user on OSes which have that concept. o...
2011 Oct 31
0
R 2.14.0 is released
...rectory). See its help for exactly which times it sets on various OSes. o The file times reported by file.info() are reported to sub-second resolution on systems which support it. (Currently the POSIX 2008 and FreeBSD/Darwin/NetBSD methods are detected.) o New function getCall(m) as an abstraction for m$call, enabling update()'s default method to apply more universally. (NB: this can be masked by existing functions in packages.) o Sys.info() gains a euser component to report the 'effective' user on OSes which have that concept. o...
2015 Dec 03
3
Function attributes for LibFunc and its impact on GlobalsAA
----- Original Message ----- > From: "James Molloy via llvm-dev" <llvm-dev at lists.llvm.org> > To: "Vaivaswatha Nagaraj" <vn at compilertree.com> > Cc: "LLVM Dev" <llvm-dev at lists.llvm.org> > Sent: Thursday, December 3, 2015 4:41:46 AM > Subject: Re: [llvm-dev] Function attributes for LibFunc and its impact on GlobalsAA > >