[Rd] R unstable and crashes after executing .C

2007-02-21 Thread Sole Acha, Xavi
Dear R listers, I have developed a C function to be executed from R through the ".C" interface. After doing dyn.load, the function executes properly and I get the results. However, after executing my function, R seems to get unstable and crashes (giving a segmentation fault and exiting) when

Re: [Rd] R unstable and crashes after executing .C

2007-02-21 Thread Oleg Sklyar
There are many packages around that use .C and .Call interfaces with really huge objects and still are pretty stable. The error is most likely in your own C code and it most likely to be connected to memory allocation/deallocation or array indexing, but without having the code here no one will

Re: [Rd] R unstable and crashes after executing .C

2007-02-21 Thread Prof Brian Ripley
Please do as I suggested in my reply to your message to R-help! And do read the posting guide and not send HMTL mail. On Wed, 21 Feb 2007, Sole Acha, Xavi wrote: Dear R listers, I have developed a C function to be executed from R through the ".C" interface. After doing dyn.load, the functio

[Rd] JIT compiler library

2007-02-21 Thread Vladimir Dergachev
Since this escaped my notice before, I thought it useful to post a link here - in case you have not seen it either: http://www.gnu.org/software/lightning/lightning.html This a portable JIT compiler library with fairly easy syntax (one syntax - many cpus). best

Re: [Rd] JIT compiler library

2007-02-21 Thread Marcus G. Daniels
Vladimir Dergachev wrote: > Since this escaped my notice before, I thought it useful to post a link here > - > in case you have not seen it either: > > http://www.gnu.org/software/lightning/lightning.html > > This a portable JIT compiler library with fairly easy syntax (one syntax - > many cpus)

[Rd] "Re: Contents of R-devel digest..."

2007-02-21 Thread ahmed sedky
[EMAIL PROTECTED] - [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] JIT compiler library

2007-02-21 Thread Byron Ellis
I think work on Lightning picked up again when the work on GNU Smalltalk started picking up again (there have been something like 4 or 5 releases in the last 6 months). IIRC it's a bit more lightweight than LLVM. On 2/21/07, Marcus G. Daniels <[EMAIL PROTECTED]> wrote: > Vladimir Dergachev wrote:

[Rd] non-interactive R_tryEval does not return

2007-02-21 Thread Martin Morgan
...at least I think that is what happens, at least on some configurations. Here's a repeatable example: cd R_HOME/tests/Embedding touch tmp.R make tryEval and then (correct) > ./tryEval --slave Error in sqrt("") : Non-numeric argument to mathematical function Caught an error calling sqrt(). Try

[Rd] Adding difftime objects to POSIXt objects

2007-02-21 Thread Jeffrey Horner
Hello, ?DateTimeClasses states that "one can add or subtract a number of seconds or a 'difftime' object from a date-time object, but not add two date-time objects." So, is the below expected behavior? > x <- Sys.time() > x [1] "2007-02-21 16:19:56 CST" > x + as.difftime("1","%H") [1] "2007-

Re: [Rd] non-interactive R_tryEval does not return

2007-02-21 Thread Thomas Friedrichsmeier
On Wednesday 21 February 2007 23:09, Martin Morgan wrote: > > ./tryEval --slave < tmp.R > > Error in sqrt("") : Non-numeric argument to mathematical function > Execution halted To force interactive use (when embedding), you can set R_Interactive (from Rinterface.h) to TRUE, after Rf_initEmbeddedR

Re: [Rd] non-interactive R_tryEval does not return

2007-02-21 Thread Martin Morgan
Yes, I know this, but R then acts as though it were interactive! Thanks for the suggestion though. Martin Thomas Friedrichsmeier <[EMAIL PROTECTED]> writes: > On Wednesday 21 February 2007 23:09, Martin Morgan wrote: >> > ./tryEval --slave < tmp.R >> >> Error in sqrt("") : Non-numeric argument to

Re: [Rd] Adding difftime objects to POSIXt objects

2007-02-21 Thread Jeffrey Horner
Jeffrey Horner wrote: > Hello, > > ?DateTimeClasses states that "one can add or subtract a number of > seconds or a 'difftime' object from a date-time object, but not add two > date-time objects." > > So, is the below expected behavior? > > > x <- Sys.time() > > x > [1] "2007-02-21 16:19:56

Re: [Rd] non-interactive R_tryEval does not return

2007-02-21 Thread Prof Brian Ripley
Yes, this is as expected/documented (in so far as R_tryEval is documented: it is not part of the API, as far as I am aware). Its point is to be the equivalent of submitting an expression from the toplevel and returning to the toplevel, without using R_ReadConsole. So it behaves in just the same

Re: [Rd] Adding difftime objects to POSIXt objects

2007-02-21 Thread Prof Brian Ripley
This is known, and not easy to solve given the way dispatch works for binary operators. The documentation was broken when Ops.difftime was introduced. You have found the known fix On Wed, 21 Feb 2007, Jeffrey Horner wrote: > Jeffrey Horner wrote: >> Hello, >> >> ?DateTimeClasses states t

Re: [Rd] non-interactive R_tryEval does not return

2007-02-21 Thread Thomas Friedrichsmeier
On Wednesday 21 February 2007 23:53, Martin Morgan wrote: > Yes, I know this, but R then acts as though it were interactive! > Thanks for the suggestion though. Martin If that is a problem, another way around it would be to set options("error") instead. Regards Thomas Friedrichsmeier pgp3lsjKd

Re: [Rd] non-interactive R_tryEval does not return

2007-02-21 Thread Thomas Friedrichsmeier
On Wednesday 21 February 2007 23:58, Prof Brian Ripley wrote: > Yes, this is as expected/documented (in so far as R_tryEval is > documented: it is not part of the API, as far as I am aware). Fortunately, it is part of the API. Regards Thomas Friedrichsmeier pgpvK3lruN9w8.pgp Description: PGP si

Re: [Rd] non-interactive R_tryEval does not return

2007-02-21 Thread Martin Morgan
Prof Brian Ripley <[EMAIL PROTECTED]> writes: > Yes, this is as expected/documented (in so far as R_tryEval is > documented: it is not part of the API, as far as I am aware). > > Its point is to be the equivalent of submitting an expression from the > toplevel and returning to the toplevel, withou

Re: [Rd] non-interactive R_tryEval does not return

2007-02-21 Thread Prof Brian Ripley
On Thu, 22 Feb 2007, Thomas Friedrichsmeier wrote: > On Wednesday 21 February 2007 23:58, Prof Brian Ripley wrote: >> Yes, this is as expected/documented (in so far as R_tryEval is >> documented: it is not part of the API, as far as I am aware). > > Fortunately, it is part of the API. I was unawa