similar to: use list as function arguments

Displaying 20 results from an estimated 1000 matches similar to: "use list as function arguments"

2008 Feb 16
3
[LLVMdev] linux/x86-64 codegen support
See the bug for a reduction and the gimple trees. validate_arglist definately is rejecting the arglist in EmitBuiltinAlloca. (try: bool TreeToLLVM::EmitBuiltinAlloca(tree exp, Value *&Result) { tree arglist = TREE_OPERAND(exp, 1); if (!validate_arglist(arglist, INTEGER_TYPE, VOID_TYPE)) { debug_tree(arglist); return false; } Value *Amt = Emit(TREE_VALUE(arglist), 0); Amt =
2008 Feb 16
0
[LLVMdev] linux/x86-64 codegen support
Andrew Lenharth wrote: > Interestingly, in the .i file there are 2 __builtin_alloca, and > EmitBuiltinAlloca is only being called once. > > Hmm, here EmitBuiltinAlloca gets called twice, but it looks like validate_arglist is rejecting the args both times. I have 2 calls to alloca generated: $ grep alloca x.bc|grep call %tmp21 = call i8* @alloca( i64 %tmp20 ) nounwind
2005 Feb 22
1
Error when using do.call
useRs, I'm using version 2.0.1 on Windows XP. I am a bit of a newbie and I am trying to learn the concept of computing on the language. I have an example that I think ought to work, but will not and I am not sure what I am doing wrong. I would like to sort a data frame by a list of columns. Eventually I would like to wrap this in a function so that I could sort data frames by a list
2010 Oct 05
2
How to convert a list to a ... argument for a function
Hi, I have a function f <- function(..., func){ something }, where func is a function of the form function(...). ?I would like to pass func all the arguments passed to f except the last. ?I know that I can manipulate the variable number of arguments passed to f by converting ... to a list, i.e., arglist <- list(...). ?But how do I pass func the first n-1 list items of arglist (n <-
2018 Aug 09
2
ArgList flag values
I've come across a need to know whether an option was set true, false or unspecified. If it is true I want to do one thing, if it is false I want to do something else and if it is unspecified I want to do nothing. ArgList::hasFlag is a convenient way to check true/false with a default value. An ArgList::hasFlag that returned Optional<bool> would allow checking the unspecified case.
2004 Nov 29
1
Call to trellis.focus(); thenpanel.superpose()
The following works fine with the x11 device, though it may well be that an initial plot is overwritten. With a pdf or postscript device, I get two plots, the first of which still has the red border from having the focus, while the second is the plot that I want. library(lattice); library(grid) plt <- xyplot(uptake ~ conc, groups=Plant, data=CO2) print(plt)
2013 Jan 24
3
[LLVMdev] [lld] driver and options questions
Michael, I'm looking at flushing out the mach-o driver and targetinfo. Can we rename the "ld64" flavor to "darwin". The command line tool on MacOSX is called "ld" - just like on unix. The name ld64 is the current source repository name for the linker. Once lld takes over, the term ld64 won't mean anything. I've worked through adding DarwinOpts.td
2005 Dec 07
1
Dots argument in apply method
Hello everyone, I'm working on a package using S4 classes and methods and I ran into the following "problem" when I tried to create an "apply" method for objects of one of my new classes. I've found a way around the problem but I wonder if I did not paint myself into the corner. I'd like your opinion about that. So I have an object "myObj" of class
2006 May 09
1
Seg fault when installing package from bad repository
> install.packages("rggobi", repos="http://ggobi.org/r/") Warning in install.packages("rggobi", repos = "http://ggobi.org/r/") : argument 'lib' is missing: using /Users/hadley/Library/R/library/ Reading symbols for shared libraries . done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at
2008 Aug 13
2
messing with ...
I'm looking for advice on manipulating parameters that are going to be passed through to another function. Specifically, I am working on my version of "mle", which is a wrapper for optim (among other optimizers). I would prefer not to replicate the entire argument list of optim(), so I'm using ... to pass extra arguments through. However: the starting values are
2014 Dec 13
2
[LLVMdev] Correct way to access Function ArgumentList?
Hey All, I’m working with Mac OS X 10.10, and everything seems generally fine but when I started working on a FunctionPass I get the following: error: call to deleted constructor of 'Function::ArgumentListType' (aka 'iplist<llvm::Argument>') Function::ArgumentListType argList = f.getArgumentList(); Any pointers as to the correct way access the Arguments of a
2017 Jun 06
0
Force argument to have quotes
Harold: As a general rule, if you are using eval(parse(...)) you are doing it poorly in R; cf library("fortunes") fortune(106) Why is something like this not suitable: fun1 <- function(a1,a2,a3 = c("hi","by")) { cat(a3,a1+a2,"\n") } > fun1 (1,2) hi by 3 > fun1(1,2, a3 = "whoopee") whoopee 3 ... or, if you want to include the
2014 May 02
1
backtrace while trying to clear workspace
Hi , I tried to do the following . Before I execute the R script , i tried to clear the work space using rm(list = ls(all = TRUE)); . I get the following back trace . Its a huge backtrace , attached a part of it . Can anyone help why I get this ? #13 0x00002aaaaafd612f in Rf_eval (e=0x1448d68, rho=0x16c6780) at eval.c:399 #14 0x00002aaaaafdabf6 in Rf_applyClosure (call=0x1447108, op=0x1448f60,
2016 Sep 23
2
Undocumented 'use.names' argument to c()
I'd vote for it to stay. It could of course suprise someone who'd expect c(list(a=1), b=2, use.names = FALSE) to generate list(a=1, b=2, use.names=FALSE). On the upside, is the performance gain from using use.names=FALSE. Below benchmarks show that the combining of the names attributes themselves takes ~20-25 times longer than the combining of the integers themselves. Also, at no
2016 Jun 01
2
segfault / crash when asking for large memory via strrep()
We've had this more general topic on R-help, and also in R-devel recently. There's one case here where I get the feeling R never gets into swapping but more directly aborts possibly from a bug we can more easily fix. Today I've been working (successfully! - not yet committed) at fixing str() for very large strings. In this process, I've found that pc <- function(.)
2013 Aug 22
0
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt (Clang patch)
Clang patch for X32 support. Applies against current trunk. --- ./tools/clang/include/clang/Driver/Options.td.orig 2013-05-16 21:51:51.286129820 +0000 +++ ./tools/clang/include/clang/Driver/Options.td 2013-05-16 21:53:24.875004239 +0000 @@ -841,6 +841,7 @@ HelpText<"Enable hexagon-qdsp6 backward compatibility">; def m3dnowa : Flag<["-"], "m3dnowa">,
2018 Aug 06
2
SIGSEGV in R_RunWeakRefFinalizer, object allocated with Rcpp
Hi all, I'm not sure if I'm not supposed to do the following (the dyn.unload part, I mean) or this could be a bug (in R or Rcpp): ``` Rcpp::sourceCpp(code=' #include <Rcpp.h> class Object {}; //[[Rcpp::export]] SEXP new_object() { return Rcpp::XPtr<Object>(new Object()); }' ) new_object() dyn.unload(list.files(tempdir(), ".(so|dll)$",
2008 Oct 03
1
Memory crash
Hello, I get a segfault when running glmmboot in my own package glmmML. Has happened many time before, but this time I get no hint of where in my C functions the error might be. I give the output below. Can this be an R bug? I suspect it has to do with repeated calls to 'vmmin' like this: for (...){ vmax = vmaxget(); vmmin(*p, b, &Fmin, bfun,
2016 Sep 25
1
Undocumented 'use.names' argument to c()
>From comments in http://stackoverflow.com/questions/24815572/why-does-function-c-accept-an-undocumented-argument/24815653 : The code of c() and unlist() was formerly shared but has been (long time passing) separated. From July 30, 1998, is where do_c got split into do_c and do_unlist. With the implementation of 'c.Date' in R devel r71350, an argument named 'use.names' is
2016 Sep 05
2
RFC: FileCheck Enhancements
Ok, when I change syntax I will load new patch. Thanks, Elena. -----Original Message----- From: vsk at apple.com [mailto:vsk at apple.com] Sent: Thursday, September 01, 2016 9:38 PM To: Elena Lepilkina <Elena.Lepilkina at synopsys.com> Cc: Mehdi Amini <mehdi.amini at apple.com>; llvm-dev at lists.llvm.org Subject: Re: [llvm-dev] RFC: FileCheck Enhancements It is necessary to be