similar to: How to convert a list to a ... argument for a function

Displaying 20 results from an estimated 20000 matches similar to: "How to convert a list to a ... argument for a function"

2010 Aug 02
1
Multibyte characters in (row) names
I have an array with names which contain multibyte characters. ?When I try to write the array to a file using write.table and row.names = T I receive an error message when the first such name is encountered, saying that I have not specified the option to generate NA instead. ?I really would be satisfied if the row name in the file were exactly what is displayed when I print the array on the
2009 Nov 03
2
R 2.10.0: Error in gsub/calloc
I'm running R 2.10.0 under Mac OS X 10.5.8; however, I don't think this is a Mac-specific problem. I have a very large (158,908 possible sentences, ca. 58 MB) plain text document d which I am trying to tokenize: t <- strapply(d, "\\w+", perl = T). I am encountering the following error: Error in base::gsub(pattern, rs, x, ...) : Calloc could not allocate (-1398215180 of
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
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
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 =
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
2012 May 31
1
Using RDF/OWL with R?
Hello, Is there a convenient way to import RDF/OWL data into R? I'm interested in importing BioPAX/SBPAX data into R to make them available for a wider audience. One exciting application would be to use pathway data to explain differential microarray measurements by identifying upstream nodes that are likely involved in causing the differences. This could also be used to validate
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 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
2004 Jul 25
2
file index-mail-headers.c: line 408 (index_mail_get_header): assertion failed: (ret != 0)
FreeBSD 4.10-RELEASE, dovecot-1.0-test29 crashes on sort and thread commands: Jul 25 15:12:08 owl dovecot: imap-login: Login: dima [81.19.64.101] Jul 25 15:12:26 owl dovecot: IMAP(dima): file index-mail-headers.c: line 408 (index_mail_get_header): assertion failed: (ret != 0) Jul 25 15:12:26 owl dovecot: child 20384 (imap) killed with signal 6 (gdb) bt #0 0x281e0fc4 in kill () from
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 Jun 10
1
OWL ontologies in R?
Are there any R packages to import and use Web Ontology Language (OWL) ontologies (represented in OWL/RDF or other form)? Thanks, -s [[alternative HTML version deleted]]
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 30
3
Cisco Asterisk Integration
Hello All, I have managed to get my cisco and asterisk able to talk to one another I think. But cannot make a call from a phone behind call manager to the asterisk server. I have followed the cisco asterisk integration on the wiki. I have also setup a number 3000 for dialing for current local time and date on asterisk. I can call from a sip phone behind asterisk, no problems. The problem
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)
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
2006 May 01
1
GBP/pound sign being converted to question mark
Hi everbody. I''m at my wit''s end with a tiny bug in my Rails app. The UK pound symbol (?) is being converted to a question mark (?) somewhere when I save my models. Here''s all the information I can think of. * Constructing a model containing a ?-sign and displaying its contents works fine. * Saving a ?-sign into the database on the mysql command line and retrieving
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
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