search for: fcall

Displaying 20 results from an estimated 55 matches for "fcall".

Did you mean: call
2009 May 21
3
[LLVMdev] Passing a pointer to a function
...some C file that implements those functions. Things were going well until I started trying to make function calls with a pointer as a parameter. For example, I would like to do something like: void visitLoadInst(LoadInst &I) { Value *P; P = I.getPointerOperand(); CallInst::Create(load_fcall, P, "", &I); } Where load_fcall is build using a call to Module::getOrInsertFunction as in the example here: http://wiki.llvm.org/HowTo:_Insert_a_function_call My question is, what do I pass as the argument type for P above? The following seems to work, as long as there are no floa...
2006 Jun 26
0
[klibc 21/43] alpha support for klibc
...arch/alpha/Makefile.inc +# +# Special rules for this architecture. Note that this is actually +# included from the main Makefile, and that pathnames should be +# accordingly. +# + +# Special CFLAGS for the divide code +DIVCFLAGS = $(KLIBCREQFLAGS) $(KLIBCARCHREQFLAGS) \ + -O3 -fomit-frame-pointer -fcall-saved-1 -fcall-saved-2 \ + -fcall-saved-3 -fcall-saved-4 -fcall-saved-5 -fcall-saved-6 \ + -fcall-saved-7 -fcall-saved-8 -ffixed-15 -fcall-saved-16 \ + -fcall-saved-17 -fcall-saved-18 -fcall-saved-19 -fcall-saved-20 \ + -fcall-saved-21 -fcall-saved-22 -ffixed-23 -fcall-saved-24 \ + -ffixed-25 -ffix...
2011 Mar 15
1
Problem with nls.lm function of minpack.lm package.
...vary the parameters (the way the parameter vector changes is decided by either a finite difference method or the Jacobian function you supply). There are some strange things going on with your models; in the case of this call: out <- nls.lm(par = guess, fn = fcn, jac = fcn.jac, fcall = f.Th, jcall = j.Th, h = h, Th = Th, control = nls.lm.control(maxfev = integer(), maxiter = 10000, nprint=100)) The parameter estimates keep changing even after 1000 iterations. This is not good. In the second fit, I change the starting values slightly, to ##star...
2011 Apr 29
3
How to define specially nested functions
Dear All, I would like to define a function: f(x,y,z) with three arguments x,y,z, such that: given values for x,y, f(x,y,z) is still a function of z and that I am still allowed to find the root in terms of z when x,y are given. For example: f(x,y,z) = x+y + (x^2-z), given x=1,y=3, f(1,3,z)= 1+3+1-z is a function of z, and then I can use R to find the root z=5. Thank you. -Chee [[alternative
2001 Apr 30
2
plotting an expression
...vestigating and here is what I found. If I comment out the line of curve indicated below, both calls work fine. function (expr, from, to, n = 101, add = FALSE, type = "l", ylab = NULL, log = NULL, xlim = NULL, ...) { sexpr <- substitute(expr) if (is.name(sexpr)) { fcall <- paste(sexpr, "(x)") expr <- parse(text = fcall) if (is.null(ylab)) ylab <- fcall } else { if (!(is.call(sexpr) && match("x", all.vars(sexpr), nomatch = 0))) stop("'expr' must be a function o...
2011 Sep 20
2
Is it possible to pass a function argument from R to compiled code in C?
I have a function in R that takes another function as argument: f <- function(g, ...) { #g is expected to be a function } I want to see if there is a way to implement "f" in C and calling it from R using ".C" interface. I know that I can use function pointers for my C implementation, but I imagine it's going to be nearly impossible to pass a function from R to C. Are
2009 Dec 15
2
split.data.frame
...ith" and "subset" semantics for data frames and was wondering if we could have something similar with split, basically by evaluating the second argument "with" the data frame : split.data.frame function(x, f, drop = FALSE, ...){ call <- match.call( ) fcall <- call( "with", data = call[["x"]], expr = call[["f"]] ) ff <- eval( fcall, parent.frame(1) ) lapply(split(seq_len(nrow(x)), ff, drop = drop, ...), function(ind) x[ind, , drop = FALSE]) } > split( df, y ) $`1` x y 1 1 1 2 2 1 3 3 1 4...
2014 Jun 16
1
model.frame and parent environment
...> myfun <- function(formula, nd) { fit <- lm(formula, data=nd, model=FALSE) model.frame(fit) } > myfun(test) Error in is.data.frame(data): object "nd" not found -------------------- 1. The key line, in both model.frame.coxph and model.frame.lm is eval(fcall, env, parent.frame()) and it appear (at least to me) that the parent.frame() part of this is effectively ignored when fcall is itself a reference to model.frame. I'd like to understand this better. 2. The modeling functions coxph and survreg in the survival default to model=FALSE, origina...
2001 Oct 16
0
plot function
...es to curve restores its behaviour when add=FALSE: (changes only local to the delay() expression) curve <- function (expr, from, to, n = 101, add = FALSE, type = "l", ylab = NULL, log = NULL, xlim = NULL, ...) { sexpr <- substitute(expr) if (is.name(sexpr)) { fcall <- paste(sexpr, "(x)") expr <- parse(text = fcall) if (is.null(ylab)) ylab <- fcall } else { if (!(is.call(sexpr) && match("x", all.vars(sexpr), nomatch = 0))) stop("'expr' must be a function...
2009 May 24
1
filling area under a function line
...question is, am I missing something elementary here? Cheers, T areacurve<-function (expr, from = NULL, to = NULL, n = 101, add = FALSE, type = "l", ylab = NULL, log = NULL, xlim = NULL, areacol="gray", ...) { sexpr <- substitute(expr) if (is.name(sexpr)) { fcall <- paste(sexpr, "(x)") expr <- parse(text = fcall) if (is.null(ylab)) ylab <- fcall } else { if (!(is.call(sexpr) && match("x", all.vars(sexpr), nomatch = 0L))) stop("'expr' must be a function or an expression containing 'x'&...
2018 Jan 06
4
Error occurring in "emmeans" package for the two data sets I used. Please help.
...using "emmeans" package following command: ----------------------------------------------------------------------------------------------- emmeans::emmeans(medley.clementis.aov, "zinc") This gives following error: ---------------------------------- Error in recover_data.call(fcall, delete.response(terms(object)), object$na.action, : object 'possibly.random' not found Error in ref_grid(object, ...) : Perhaps a 'data' or 'params' argument is needed Data-set-2: --------------- Keough and Raimondi (1995) examined the effects of four biofilm types...
2010 Jul 07
2
how to define method for "+" function in a new class
...ength(idx) !=3D 0) not_used <- not_used[idx] } return(not_used) } ) The definition of class Molecule is included earlier in the same file. = When I source it, I get the following error message: Error in match.call(fun, fcall) :=20 unused argument(s) (x =3D "Molecule", y =3D "Molecule") I can't see what's wrong in my method definition. Can anyone help me = with this? J Dr James Foadi PhD Membrane Protein Laboratory (MPL) Diamond Light Source Ltd Diamond House Harewell Science and Innova...
2011 Apr 18
2
help with eval()
I've narrowed my scope problems with predict.coxph further. Here is a condensed example: fcall3 <- as.formula("time ~ age") dfun3 <- function(dcall) { fit <- lm(dcall, data=lung, model=FALSE) model.frame(fit) } dfun3(fcall3) The final call fails: it can't find 'dcall'. The relevant code in model.frame.lm is: env <- environment(formula$terms)...
2018 Jan 08
0
[FORGED] Error occurring in "emmeans" package for the two data sets I used. Please help.
...> command: > ----------------------------------------------------------------------------------------------- > > emmeans::emmeans(medley.clementis.aov, "zinc") > > > This gives following error: > ---------------------------------- > Error in recover_data.call(fcall, delete.response(terms(object)), > object$na.action, : > object 'possibly.random' not found > Error in ref_grid(object, ...) : > Perhaps a 'data' or 'params' argument is needed > > > > Data-set-2: > --------------- > Keough and Raimond...
2010 Nov 18
0
[LLVMdev] How to construct parameters for a insert function? one from a return value from previous call, the other one is a string....
...instruction above: write(fd, "something", strlen("something")); note: for the write function prototype in linux system is: ssize_t write(int fd, const void *buf, size_t count); Then I first insert function declaration into module using following, which I am not quite sure: fcall = M.getOrInsertFunction("write", IntegerType::get(M.getContext(), 64), IntegerType::get(M.getContext(), 32), PointerType::get(IntegerType::get(Context, 8), 0), IntegerType::get(M.getContext(), 64),...
2003 May 24
1
help with xyplot
Hi, I make a graphic using xyplot, it is very good. xyplot((ocorrencia/isca)~frag|especie) But I need to plot a curve for each especie's plot. I try to use panel.abline and others panel., but I dont succeed. I need to plot the function exp(a+b*x+c*x^2)/1+exp(a+b*x+c*x^2), a b and c are different for each especie. Normally I use the curve function to add a curve in a points
2007 Jul 17
1
difficulties with "setMethod"
...thod("write", + signature(object = "KMatrix", path = "character"), + function(object,path){ + write.table(object at data,path,row.names=FALSE, sep = "\t") + } + ) error in match.call(fun, fcall) : unused argument(s) (object = "KMatrix", path = "character") > "KMatrix" is an extension of some data.frame object, i.e. it's a data.frame (KMatrix at data) with some additional slots (e.g. KMatrix at Size) What's wrong with my setMethod? Kind regards,...
2014 Jun 17
0
model.frame question
...ot model"; why keep redundant copies? Several other packages that depend on survival failed. They assume fit$y is there, without checking. The iron chains of backwards compatability... >> >1. The key line, in both model.frame.coxph and model.frame.lm is >> > eval(fcall, env, parent.frame()) >> > >> >and it appear (at least to me) that the parent.frame() part of this is >> >effectively ignored when fcall is itself a reference to model.frame. >> >I'd like to understand this better. > Way back (ca R 1.2.0) an advocate of l...
2018 Jan 10
0
[FORGED] Error occurring in "emmeans" package for the two data sets I used. Please help.
...using "emmeans" package following command: ------------------------------------------------------------ ----------------------------------- emmeans::emmeans(medley.clementis.aov, "zinc") This gives following error: ---------------------------------- Error in recover_data.call(fcall, delete.response(terms(object)), object$na.action, : object 'possibly.random' not found Error in ref_grid(object, ...) : Perhaps a 'data' or 'params' argument is needed Data-set-2: --------------- Keough and Raimondi (1995) examined the effects of four biofilm type...
2005 Jun 02
1
Too generic with S4 methods?
...), function(spec, covs, states) { #### setMethod("likelihood", signature(model="Model", path="matrix"), function(model, path) { This fails with the message arguments in definition changed from (spec) to (object) Error in match.call(fun, fcall) : unused argument(s) (model ...) I'll note in passing that it would be helpful to have a line number for the error, and that the error didn't mean much to me. After study, my guess is that generics are not supposed to work this way. All the definitions need to have the same named argum...