search for: funnam

Displaying 19 results from an estimated 19 matches for "funnam".

Did you mean: funname
2015 Feb 24
3
alternatives to do.call() when namespace is attached but not loaded?
...e a function in a package that essentially provides a wrapper for a group of functions in another Suggested package (it sets appropriate defaults for the context, transforms output, etc). I've implemented this by verifying that the package was loaded with require(sna) and then do.call(snaFunName, args = args) The rDevel check is requesting that I use requireNamespace(sna) instead of directly loading the SNA package. This seems reasonable, except that I have yet to figure out a way to use do.call to call the function when the namespace is attached but package is not loaded. do.call(...
2004 Jun 19
0
setGeneric / standardGeneric when args are not "literals" - corrected
...ous message, I forgot to swap two lines in the body of setMakeGenericMethod. Sorry about that. The correct (full message) reads like this: Hi, This works > setGeneric("clear", function(obj) standardGeneric("clear")) [1] "clear" but this doesn't. Why? > funName <- "clear" > setGeneric(funName, function(obj) standardGeneric(funName)) Error in .recursiveCallTest(body, fname) : (converted from warning) The body of the generic function for "clear" calls standardGeneric to dispatch on a different name ("funName")! This...
2006 Dec 08
5
Remove " from a string
Hi all! I have lots of functions called in the following pattern 'NameOfFunctionNumber' where the name always stays the same and the number varies from 1 to 98. Another function which I run in advance returns the number of the function which has to be called next. Now I want to combine 'NameOfFunction' with the 'Number' returned so that i can call the desired function. I
2010 Jun 28
2
Using if statement on function
Hello everybody, I'm trying to use a if-statment on a function. For a better understanding I want to present a small example: FUN=mean # could also be median,sd or any other function if (FUN == mean) plot(...) if (FUN == median) plot(...) ... This doesn't work, because FUN is a function. I've already tried to coerce the
2020 Jun 01
1
[PATCH] erlang: Port to libei for Erlang 23
...36 +34,25 @@ instead of erl_interface. #include "guestfs.h" #include "guestfs-utils.h" +#include "actions.h" + guestfs_h *g; -extern ETERM *dispatch (ETERM *message); -extern int atom_equals (ETERM *atom, const char *name); -extern ETERM *make_error (const char *funname); -extern ETERM *unknown_optarg (const char *funname, ETERM *optargname); -extern ETERM *unknown_function (ETERM *fun); -extern ETERM *make_string_list (char **r); -extern ETERM *make_table (char **r); -extern ETERM *make_bool (int r); -extern char **get_string_list (ETERM *term); -extern int get_...
2009 Sep 09
4
usdt probes vs pid$target
...to Firefox to measure actual work done. I could have used a pid$target probe with a function name but work is done within an if statement, which is where I placed the static probes. I''m wondering about my use, though. Is the following significantly more efficient than pid$target::FunName:entry and return? I heard somewhere that $target does not need to be used with static probes but the probes don''t show up unless Firefox is running and then only as mozillaNNNNN, i.e. mozilla$target. Thanks, Joel --- BEGIN { self->ts = 0; self->vts = 0; } mozilla$tar...
2013 Jan 05
0
[LLVMdev] RuntimeDyld bug in resolving addresses with offset?
...35, 36, 37}; void foo(double val, double other[]) { other[2] += val * numbers[4]; } I adapted llvm-rtdyld.cpp to load the .o file of the code above, get a pointer to foo, and invoke it (whole thing is attached as myrtdyld.cpp): typedef void(*myFun)(double, double*); int main() { std::string funName = "_foo"; std::string fileName = "rtdyldbug.o"; myFun fptr = (myFun)getFunctionPointer(funName, fileName); double w[5] = {0, 0, 0, 0, 0}; fptr(4, w); printf("%f \n", w[2]); return 0; } The printed result should be 148, but its 132. The instruction whic...
2017 Mar 03
1
[PATCH] erlang: Rename 'message' to something less generic.
...erlang.ml +++ b/generator/erlang.ml @@ -192,7 +192,7 @@ and generate_erlang_actions_h () = extern guestfs_h *g; -extern ETERM *dispatch (ETERM *message); +extern ETERM *dispatch (ETERM *args_tuple); extern int atom_equals (ETERM *atom, const char *name); extern ETERM *make_error (const char *funname); extern ETERM *unknown_optarg (const char *funname, ETERM *optargname); @@ -205,7 +205,7 @@ extern int get_bool (ETERM *term); extern int get_int (ETERM *term); extern int64_t get_int64 (ETERM *term); -#define ARG(i) (ERL_TUPLE_ELEMENT(message,(i)+1)) +#define ARG(i) (ERL_TUPLE_ELEMENT(args_...
2015 Feb 24
0
alternatives to do.call() when namespace is attached but not loaded?
do.call(sna::snaFunName, args = args) ? Hadley On Tue, Feb 24, 2015 at 1:29 PM, Skye Bender-deMoll <skyebend at skyeome.net> wrote: > Dear R-devel > > I have a function in a package that essentially provides a wrapper for a > group of functions in another Suggested package (it sets appropriate > d...
2012 Jan 27
1
Call dynamic functions
Hi all, Does anybody know a better way to call functions than using 'eval'? I need to call functions which it's name is stored in a variable. Right now create the command string I'd like to run and then I run it using "eval". Running functions inside "eval" is starting annoying because it leads to a difficult error handling and difficult scenario to debug. So
2013 Feb 14
1
mapply error with Math (S4 group generic)
I get an error when using self-defined (not standard) functions with mapply with S4 objects from the raster package that I develop: "Error in as.character(sys.call(sys.parent())[[1]]) : cannot coerce type 'closure' to vector of type 'character'". Does anyone understand why? The problem is illustrated below. Thanks, Robert > # First a general example that works
2002 Dec 17
3
Changing "..." inside a function: impossible? desirable?
...t I now would like is ... <- unlist( list(...)["myarg" != naml] ) } BTW: one relatively ugly workaround is to use the above *list* say nlist <- list(...)["myarg" != naml] and do all subsequent call where I'd had "..." as do.call( <funname> , c(list( <<other args to funnname>> ), nlist)) but this really obfuscates the code horrendously. PS: I know that using a pars = list(.) argument instead of "..." is another alternative (that we have been using) as well, but lets assume this can't be d...
2010 Aug 08
2
Importing arguments for use by functions in a script
QUESTION: Is there a way of passing arguments from an external file to a script so that they can be used directly by functions within the script? I have a series of interdependent functions. I wish to test the time for processing various datasets. I was initially doing something along the lines of the following (yes, I am new to R): rm(list= ls())
2009 May 19
4
Qs: The list of arguments, wrapping functions...
Hi. I'm pretty new to R, but I've been programming in other languages for some time. I have a couple of questions regarding programming with function objects. 1. Is there a way for a function to refer generically to all its actual arguments as a list? I'm thinking of something like the @_ array in Perl or the arguments variable in JavaScript. (By "actual" I mean the ones
2018 Aug 24
0
conflicted: an alternative conflict resolution strategy
...owing to confirm likely-superset adherence 1. matching or purely extending formals (ie all the named arguments of base::fun match including order, and there are new arguments in pkg::fun only if base::fun takes ...) 2. explicit call to base::fun in the body of pkg::fun 3. UseMethod(funname) and at least one provided S3 method calls base::fun 4. S4 generic creation using fun or base::fun as the seeding/default method body or called from at least one method > For > example, the lubridate package provides `as.difftime()` and `date()` > which extend the behavio...
2006 Nov 09
2
Retrieving function name
Hi, Does anyone know how I can retrieve a function name, for example If I have a function f as follows: f <- function( myfunc ) { print( name_of(myfunc) ); } I want to know what I should have as "name_of" such that I could call this with : f( median ) and it would print "median" or f( my_function_name ) and it would print "m_function_name". So far all I
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
2018 Aug 23
7
conflicted: an alternative conflict resolution strategy
Hi all, I?d love to get your feedback on the conflicted package, which provides an alternative strategy for resolving ambiugous function names (i.e. when multiple packages provide identically named functions). conflicted 0.1.0 is already on CRAN, but I?m currently preparing a revision (<https://github.com/r-lib/conflicted>), and looking for feedback. As you are no doubt aware, R?s default
2012 Jan 18
4
R-Help
I am trying to create a frequency distribution and I am a bit confused. Here are the commands I have entered: > data <- read.csv(file="40609_sortedfinal.csv",head=TRUE,sep=",") > NumberOfActionsByStatus = data$STATUS > NumberOfActionsByUser = data$ETS_LOGIN > NumberOfBidOffer = data$BID_OFFER > NumberOfActionsByUser.freq = table(NumberOfActionsByUser) >