Re: [Rd] S4 Method Signatures

2010-09-03 Thread DarioAustralia
Ah, nevermind. I realised you could have function(...) as the function signature in the setGeneric call. -- View this message in context: http://r.789695.n4.nabble.com/S4-Method-Signatures-tp2525018p2525216.html Sent from the R devel mailing list archive at Nabble.com.

Re: [Rd] S4 Method Signatures

2010-09-03 Thread Martin Maechler
DS == Dario Strbenac d.strbe...@garvan.org.au on Fri, 3 Sep 2010 12:00:14 +1000 (EST) writes: DS Hello, DS If the signature of a method defines which generic it implements then I'm confused about why this minimal example I invented won't work : very short answer: if(FALSE)

[Rd] Weird erratic error and illogical error message, could someone explain this?

2010-09-03 Thread Philippe Grosjean
Hello, It's several days I try to track this bug, and even cannot cook a reproducible example. Yet, it occurs consistently in a long-running task after a variable period of time. Here is an example: ... my long-running code [as I said, cannot give something simple that produces this bug in a

[Rd] Stats not loaded? Method for as.ts() results in error

2010-09-03 Thread Janko Thyson
Dear list, I've got the following problem: In a package I'm trying to build, there exists a method for the function as.ts(). When checking the package, R always throws the error that it cannot find a function called as.ts. To me it seems that the package stats (home of as.ts()) is not

Re: [Rd] Weird erratic error and illogical error message, could someone explain this?

2010-09-03 Thread Duncan Murdoch
Philippe Grosjean wrote: Hello, It's several days I try to track this bug, and even cannot cook a reproducible example. Yet, it occurs consistently in a long-running task after a variable period of time. Here is an example: I would look closely at the other software that is running in

Re: [Rd] Stats not loaded? Method for as.ts() results in error

2010-09-03 Thread Duncan Murdoch
Janko Thyson wrote: Dear list, I've got the following problem: In a package I'm trying to build, there exists a method for the function as.ts(). When checking the package, R always throws the error that it cannot find a function called as.ts. To me it seems that the package stats (home

Re: [Rd] Weird erratic error and illogical error message, could someone explain this?

2010-09-03 Thread Philippe Grosjean
Thank you, Duncan for your answer. Indeed, I have also tcltk loaded and running, and the memory allocation problem may come from there. I'll investigate using gctorture(). For sure, I know that I need a reproducible example for further investigations. Best, Philippe

[Rd] constness in BLAS.h/dger arguments

2010-09-03 Thread Daniel Sabanés Bové
Hi, I am writing code interfacing R's BLAS functions, and have a problem with two missing const's in the header of F77_NAME(dger) in src/include/R_ext/BLAS.h. The current definition is missing the appropriate consts for the arrays x and y, which are stated in the BLAS documentation [2] to be

Re: [Rd] Weird erratic error and illogical error message, could someone explain this?

2010-09-03 Thread Martin Morgan
On 09/03/2010 04:42 AM, Duncan Murdoch wrote: Philippe Grosjean wrote: Hello, It's several days I try to track this bug, and even cannot cook a reproducible example. Yet, it occurs consistently in a long-running task after a variable period of time. Here is an example: I would look

Re: [Rd] Feature request: put NewEnvironment and R_NewhashedEnv into API

2010-09-03 Thread Michael Lawrence
What about allocSExp(ENVSXP)? Then SET_ENCLOS() to set the parent? Seems to work for me. Michael On Sun, Aug 29, 2010 at 11:02 AM, Oliver Flasch oliver.fla...@fh-koeln.dewrote: Hi, as Seth Falcon in 2006, I also need to create new environments from package C code. Unfortunately, both

Re: [Rd] Stats not loaded? Method for as.ts() results in error

2010-09-03 Thread Jeff Ryan
Janko, You don't mention if you are using S3 or S4. A small example would make it easier to identify where your problem is. Jeff On Fri, Sep 3, 2010 at 4:44 AM, Janko Thyson janko.thy...@ku-eichstaett.de wrote: Dear list, I've got the following problem: In a package I'm trying to

Re: [Rd] Weird erratic error and illogical error message, could someone explain this?

2010-09-03 Thread Philippe Grosjean
Martin, This looks like a possible explanation. After double-check, it occurs with R 2.10.1 and 2.11.0 (not 2.11.1, as I reported in my original email). I'll upgrade R and test again. I'll report the results on Monday, since my code has to run over the week-end. Thanks, PhG On 03/09/10

[Rd] Pointer to fourteen patches to speed up R

2010-09-03 Thread Radford Neal
I've continued to work on speeding up R, and now have a collection of fourteen patches, some of which speed up particular functions, and some of which reduce general interpretive overhead. The total speed improvement from these patches is substantial. It varies a lot from one R program to the

Re: [Rd] Stats not loaded? Method for as.ts() results in error

2010-09-03 Thread Janko Thyson
Hi Jeff, sorry for that! I found the problem in the meanwhile. But since I'm always grateful to get answers from the list, here's what happened: I have a method for as.ts() setMethod(f = as.ts, signature = Tsi, definition = function(x, ...) { Function body }) This is the error I

[Rd] Incorrect formatted output after subtracting non-integer seconds from POSIXt origin

2010-09-03 Thread Daniel Murphy
x-as.POSIXct(1970-1-1, tz=UTC)-.5 y-as.POSIXct(1970-1-1, tz=UTC)+.5 x==y [1] FALSE # of course but x and y appear to be the same when formatted, even with extra precision: format(x, format=%Y-%m-%d %H:%M:%OS2) [1] 1970-01-01 00:00:00.50 format(y, format=%Y-%m-%d %H:%M:%OS2) [1] 1970-01-01

Re: [Rd] Incorrect formatted output after subtracting non-integer seconds from POSIXt origin

2010-09-03 Thread Simon Urbanek
On Sep 3, 2010, at 7:56 PM, Daniel Murphy wrote: x-as.POSIXct(1970-1-1, tz=UTC)-.5 y-as.POSIXct(1970-1-1, tz=UTC)+.5 x==y [1] FALSE # of course but x and y appear to be the same when formatted, even with extra precision: format(x, format=%Y-%m-%d %H:%M:%OS2) [1] 1970-01-01 00:00:00.50

Re: [Rd] Incorrect formatted output after subtracting non-integer seconds from POSIXt origin

2010-09-03 Thread Daniel Murphy
Thanks. Yes, negative POSIX time would correspond to dates prior to 1970-1-1, or to dates prior to a more recent origin that borrows functionality from the POSIXt class: as.POSIXct(-.5, origin=as.POSIXct(2011-1-1)). If negative POSIX time is supposed to work then it's a bug in as.POSIXlt().