similar to: Error when using do.call

Displaying 20 results from an estimated 10000 matches similar to: "Error when using do.call"

2008 Dec 09
2
Need help optimizing/vectorizing nested loops
Hi, I'm analyzing a large number of large simulation datasets, and I've isolated one of the bottlenecks. Any help in speeding it up would be appreciated. `dat` is a dataframe of samples from a regular grid. The first two columns are the spatial coordinates of the samples, the remaining 20 columns are the abundances of species in each cell. I need to calculate the species richness in
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
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)
2007 Sep 20
1
Identify and plotting symbols. [SEC=UNCLASSIFIED]
Rolf turner wrote: >I have been trying, unsuccessfully, to use identify() to (simply) >return a list of the indices of points clicked on and overplot (with >say a solid dot) each clicked-on point so that I can see where I've >been. I.e. I don't want to see the indices printed on the screen; I just want the points I've already selected to be highlighted. > >I
2012 May 24
1
use list as function arguments
Hello Folks, Is there any way to pass a list into a function such that the function will use the list as its arguments? I haven't been able to figure that out. The background: I'm trying to build a function that will apply another function multiple times, each time with a different set of specified arguments. I'm trying to figure out how to pass in a list of argument lists, then
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
2008 Mar 28
1
Beginner help with retrieving frequency and transforming a matrix
Hi All, Just hoping some one can give me a hand with a problem... I have a dataframe (DF) with about 5 million entries that looks something like the following: >DF ID Cl Co Brd Ind A AB AB 1 S-3 IND A BR_F BR_F01 1 0 0 2 S-3 IND A BR_F BR_F01 1 0 0 3 S-3 IND A BR_F BR_F01 1 0 0 4 S-3 IND A BR_F BR_F01 1 0 0 5 S-3 IND A BR_F BR_F01 1 0 0 6 S-3 IND A BR_F
2012 Nov 17
2
problem with "any" function
Dear R users, I have the "any" function of R  any(ind.c, ind.r, ind.sgn) all are logical factors  it works fine when any of three is true but when they are combined it doesnt work. i tried this any(ind.c, ind.r, ind.sgn,((ind.c==TRUE) & (ind.r==TRUE)), ((ind.c==TRUE) & (ind.sgn==TRUE)),((ind.r==TRUE) & (ind.sgn==TRUE)),  ((ind.c==TRUE) & (ind.r==TRUE) &
2001 Nov 28
1
Reading output from "debugfs -R stat <8>"
Hi, I'm trying to understand if my journal is fragmented. Here's some output from `debugfs -R "stat <8>" /dev/sda3`: Inode: 8 Type: regular Mode: 0600 Flags: 0x0 Generation: 0 User: 0 Group: 0 Size: 104857600 File ACL: 0 Directory ACL: 0 Links: 1 Blockcount: 205016 Fragment: Address: 0 Number: 0 Size: 0 ctime: 0x3c0442fd -- Tue Nov 27
2004 Jun 18
2
Barplots and error indicators: Some R-Code
I' ve seen that several people are looking for a function that creates a barplot with an error indicators (I was one of them myself). Maybe you will find the following code helpful (There are some examples how to use it at the end): # Creates a barplot. #bar.plot() needs a datavector for the height of bars and a error #indicator for the interval #many of the usual R parameters can be set: