[Rd] Reduce: extra args wishlist?

2009-06-06 Thread Ben Bolker
Is there a reason that Reduce() doesn't take a "..." argument that would allow arbitrary extra arguments to be passed through to the function? Here is a little example of how this would be convenient: z <- list( data.frame(state=c("California"), cases=0),

Re: [Rd] Qs on calling R from C

2009-06-06 Thread Kynn Jones
On Sat, Jun 6, 2009 at 5:31 PM, Dirk Eddelbuettel wrote: > > Try reading 'R Extensions' section 8.1 entitled 'Embedding R under > Unix-alikes'. That was just what I needed! All it took was adding a single line before the call to mkString (and adding one more header file): #include #include

Re: [Rd] Qs on calling R from C

2009-06-06 Thread Dirk Eddelbuettel
On 6 June 2009 at 17:03, Kynn Jones wrote: | Consider the following simple C program: | | /*** hello_r.c ***/ | #include | | SEXP hello() { | return mkString("Hello, world!\n"); | } | | int main(void) { | SEXP x = hello(); | return x == NULL; /* i.e. 0 on success */ | } | | Thi

[Rd] Qs on calling R from C

2009-06-06 Thread Kynn Jones
Consider the following simple C program: /*** hello_r.c ***/ #include SEXP hello() { return mkString("Hello, world!\n"); } int main(void) { SEXP x = hello(); return x == NULL; /* i.e. 0 on success */ } This program segfaults: % myR/bin/R CMD LINK gcc -I./R-2.9.0/src/include -L.

Re: [Rd] need help with libtool/aclocal error

2009-06-06 Thread Kynn Jones
On Sat, Jun 6, 2009 at 5:58 AM, Prof Brian Ripley wrote: > ...or just > updating tools/ltmain.sh from > https://svn.r-project.org/R/branches/R-2-9-branch/tools/ltmain.sh and > re-configuring and re-making R. Thanks, that worked like a charm. __ R-devel

Re: [Rd] need help with libtool/aclocal error

2009-06-06 Thread Prof Brian Ripley
Looks like libtool is objecting to a patch-level mismatch in hte R sources (and I'm surprised that such minor mismatches are not allowed). You should be able to solve this by using a current R-patched (>=r48719), or just updating tools/ltmain.sh from https://svn.r-project.org/R/branches/R-2-9-