[Rd] Bug: broken exception handling in S4 methods

2010-07-21 Thread Sklyar, Oleg (London)
Hi all: we have noticed for quite a while that certain errors cannot be handled by R try, tryCatch etc blocks, but it was fairly difficult to understand what were the conditions for this incorrect behaviour. Finally I stabbed across a very understandable case, which is outlined in the (runnable)

Re: [Rd] POSIXlt matching bug

2010-07-02 Thread Sklyar, Oleg (London)
POSIXlt is a list and it is not a list of dates or times, it is a list of x - as.POSIXlt(Sys.Date()) names(x) [1] sec min hour mday mon year wday yday isdst So if you want to match these things, you should use POSIXct or any other numeric-based format (as POSIXct is just a double

Re: [Rd] Bug in R -e command

2010-05-10 Thread Sklyar, Oleg (London)
- From: Dirk Eddelbuettel [mailto:e...@debian.org] Sent: 07 May 2010 15:43 To: Sklyar, Oleg (London) Cc: r-devel@r-project.org Subject: Re: [Rd] Bug in R -e command On 7 May 2010 at 15:23, Sklyar, Oleg (London) wrote: | Hi all: | | since about a month we encountered a problem with R -e

[Rd] Bug in R -e command

2010-05-07 Thread Sklyar, Oleg (London)
Hi all: since about a month we encountered a problem with R -e command: spaces in the command of R -e command are no more tolerated. This same issue affects 2.11 patched (05-05-2010), 2.10.1, and current devel (at least the one of two weeks ago). (I skip the mid of the printouts, replaced with

Re: [Rd] Why no race condition when returning UNPROTECT-ed memory fromC?

2010-04-14 Thread Sklyar, Oleg (London)
Because there is no second thread to do that, R is single threaded. The gc could only be run from within another R API command or macro, but there is none in between. Best Oleg Dr Oleg Sklyar Research Technologist AHL / Man Investments Ltd +44 (0)20 7144 3803 oskl...@maninvestments.com

[Rd] Job: AHL Research Developer, R/python - top hedge fund, Oxford/London UK

2010-04-13 Thread Sklyar, Oleg (London)
Dear list subscribers, this is posted in appreciation of the level of skill that subscribers to this mailing list enjoy and in no way to abuse it. We are looking to hire a Research Developer with extensive R and/or python development skills. If interested (below), please contact me directly on

[Rd] likely bug in 'serialize' or please explain the memory usage

2009-11-03 Thread Sklyar, Oleg (London)
Hi all, assume the following problem: a function call takes a function object and a data variable and calls this function with this data on a remote host. It uses serialization to pass both the function and the data via a socket connection to a remote host. The problem is that depending on the

Re: [Rd] likely bug in 'serialize' or please explain the memory usage

2009-11-03 Thread Sklyar, Oleg (London)
to the local frame you can just attach a new smaller environment after building the function. Duncan Murdoch Sklyar, Oleg (London) wrote: Hi all, assume the following problem: a function call takes a function object and a data variable and calls this function with this data

Re: [Rd] Changing the compiler gfortran to ifort

2009-08-11 Thread Sklyar, Oleg (London)
on Unix alikes possibly: env F77=/path/to/ifort ./configure --prefix=/where/to/install Dr Oleg Sklyar Research Technologist AHL / Man Investments Ltd +44 (0)20 7144 3107 oskl...@maninvestments.com -Original Message- From: r-devel-boun...@r-project.org

Re: [Rd] CTRL-C during .Call causes R to quit to command line

2009-03-30 Thread Sklyar, Oleg (London)
If you use JNI or rJava, you should start the VM with -Xrs argument, otherwise the descibed things happen as Java catches the Ctrl-C interrupt Dr Oleg Sklyar Research Technologist AHL / Man Investments Ltd +44 (0)20 7144 3107 oskl...@maninvestments.com -Original Message- From:

[Rd] imporving performance of slicing on matrices and S4 their derivatives

2009-03-27 Thread Sklyar, Oleg (London)
Dear list. It is a known issue that accessing slots of S4 objects and in particular accessing .Data slots is slow in R. However, what surprises me are two things demonstrated in the code below (runnable with 'inline', my times are in the comments): - copying data out of a large 3x1e7 .Data slot

[Rd] consistent segfaults in ROracle with one of the databases

2009-03-27 Thread Sklyar, Oleg (London)
Dear list. Has anybody had any issues with ROracle, namely consistently leading to a segmentation fault? One of our oracle databases seems to have certain issues at the moment (do not know what exactly though) and if that one is queried ROracle definitely fails with a segmentation fault. Any

[Rd] typo in sprintf format string segfaults R

2009-03-26 Thread Sklyar, Oleg (London)
typo as simple as %S instead of %s segfaults R devel: *** R 2.9.0 (svn -r 47821) [/share/research/R-devel/20090203/lib64/R] *** sprintf(%S%d, aaa, 1) *** caught segfault *** address 0x8000, cause 'memory not mapped' Traceback: 1: sprintf(%S%d, aaa, 1) Possible actions: 1: abort (with core

[Rd] Rd \usage clause for an S4 replace method

2009-03-13 Thread Sklyar, Oleg (London)
Given S4 methods [ and [-, how do I write the Rd-file usage clause for the latter one? What I have now is: \S4method{[}{TimeSeries,TimeDate,missing}(x, i, j, ..., drop) \S4method{[-}{TimeSeries,TimeDate,missing,ANY}(x, i, j, ..., value) which results in the following output: ## S4 method

Re: [Rd] S4 generic masking S3 generic when using namespace

2009-03-10 Thread Sklyar, Oleg (London)
Try using setGeneric(predict) without further arguments, this should work as it will take the existing 'predict' definition and convert it into S4 generic. This works nicely for me for all plot, print etc methods * R *** R 2.9.0 (svn -r 47821) [/share/research/R-devel/20090203/lib64/R] ***

[Rd] interactive graphics for R: was Google Summer of Code 2009

2009-02-19 Thread Sklyar, Oleg (London)
statistical plots -- at least that's what our experience shows. Agree completely. Cheers, Simon -Original Message- From: Simon Urbanek [mailto:simon.urba...@r-project.org] Sent: 19 February 2009 14:34 To: Sklyar, Oleg (London) Cc: Friedrich Leisch; r-devel@r-project.org

Re: [Rd] Google Summer of Code 2009

2009-02-19 Thread Sklyar, Oleg (London)
Two ideas: 1) A library for interactive plots in R R lacks functionality that would allow displaying of interactive plots with two distinct functionalities: zooming and panning. This functionality is extremely important for the analysis of large, high frequency, data sets spanning over large

Re: [Rd] Google Summer of Code 2009

2009-02-19 Thread Sklyar, Oleg (London)
- From: Simon Urbanek [mailto:simon.urba...@r-project.org] Sent: 19 February 2009 14:34 To: Sklyar, Oleg (London) Cc: Friedrich Leisch; r-devel@r-project.org; manuel.eugs...@stat.uni-muenchen.de Subject: Re: [Rd] Google Summer of Code 2009 On Feb 19, 2009, at 6:38 , Sklyar, Oleg (London

Re: [Rd] Google Summer of Code 2009

2009-02-19 Thread Sklyar, Oleg (London)
, Oleg (London) Cc: Simon Urbanek; Friedrich Leisch; manuel.eugs...@stat.uni-muenchen.de; r-devel@r-project.org Subject: Re: [Rd] Google Summer of Code 2009 On Thu, Feb 19, 2009 at 3:47 PM, Sklyar, Oleg (London) oskl...@maninvestments.com wrote: I do think there is a need for an interactive

Re: [Rd] Google Summer of Code 2009

2009-02-19 Thread Sklyar, Oleg (London)
Investments Ltd +44 (0)20 7144 3107 oskl...@maninvestments.com -Original Message- From: Yihui Xie [mailto:xieyi...@gmail.com] Sent: 19 February 2009 16:20 To: Sklyar, Oleg (London) Cc: Liviu Andronic; Friedrich Leisch; Simon Urbanek; manuel.eugs...@stat.uni-muenchen.de; r-devel@r

Re: [Rd] setClassUnion with numeric; extending class union

2009-02-12 Thread Sklyar, Oleg (London)
...@maninvestments.com -Original Message- From: John Chambers [mailto:j...@r-project.org] Sent: 11 February 2009 20:40 To: Sklyar, Oleg (London) Cc: r-devel@r-project.org Subject: Re: [Rd] setClassUnion with numeric; extending class union So, I was intrigued and played around a bit

[Rd] setClassUnion with numeric; extending class union

2009-02-11 Thread Sklyar, Oleg (London)
Dear list: I am looking for a good way to create an S4 class that would extend numeric, but would allow NULL instead of data as well. As far as I can see there is no way at the moment to do that, but please correct me if I am wrong. The best solution I came up with so far was the following (it

[Rd] after some time R stopped returning from Rmpi calls

2009-01-29 Thread Sklyar, Oleg (London)
Hi, this is not exactly a developer question, but maybe you have noticed similar behaviour before. For quite some time R and Rmpi were working perfectly for me until one day they just stopped doing so without any changes in the configs. R still spawns jobs as requested, and if they are small they

Re: [Rd] Return values from .Call and garbage collection

2009-01-27 Thread Sklyar, Oleg (London)
- R is not multithreaded (or so it was) and thus race condition cannot occur - I would think there is no call to GC at the time of assignment of the return value to a variable. GC is only called within other R calls as R as mentioned above is not multithreaded Most likely issue is your code

Re: [Rd] [Q] R CMD check signals error on code that works from UI

2009-01-15 Thread Sklyar, Oleg (London)
Because there is a % sign, which is stripped out by LaTeX used to build the help system as a comment. Just look at how your example code is output -- the string is unterminated because the matching quote is masked by % latex comment Dr Oleg Sklyar Research Technologist AHL / Man Investments Ltd

Re: [Rd] particulars of importing/loading libraries

2009-01-14 Thread Sklyar, Oleg (London)
to convert 'testPosixVal' to class POSIXlt Dr Oleg Sklyar Research Technologist AHL / Man Investments Ltd +44 (0)20 7144 3107 oskl...@maninvestments.com -Original Message- From: Simon Urbanek [mailto:simon.urba...@r-project.org] Sent: 14 January 2009 01:51 To: Sklyar, Oleg (London) Cc: r

Re: [Rd] particulars of importing/loading libraries

2009-01-14 Thread Sklyar, Oleg (London)
Thank you Simon. Dr Oleg Sklyar Research Technologist AHL / Man Investments Ltd +44 (0)20 7144 3107 oskl...@maninvestments.com -Original Message- From: Simon Urbanek [mailto:simon.urba...@r-project.org] Sent: 14 January 2009 16:11 To: Sklyar, Oleg (London) Cc: r-devel@r

[Rd] particulars of importing/loading libraries

2009-01-13 Thread Sklyar, Oleg (London)
Dear List: Sorry for posting maybe a trivial question, but I have a basic understanding problem. If I have say pack1 and pack2, two R packages, and pack2 depends on and imports pack1 fully (as in the code below), is there a way to make all the functionality of pack1 available for the global and

Re: [Rd] particulars of importing/loading libraries

2009-01-13 Thread Sklyar, Oleg (London)
probably will have to do, reexport everything. Dr Oleg Sklyar Research Technologist AHL / Man Investments Ltd +44 (0)20 7144 3107 oskl...@maninvestments.com -Original Message- From: Martin Morgan [mailto:mtmor...@fhcrc.org] Sent: 13 January 2009 16:31 To: Sklyar, Oleg (London) Cc: r-devel

Re: [Rd] particulars of importing/loading libraries

2009-01-13 Thread Sklyar, Oleg (London)
[mailto:mtmor...@fhcrc.org] Sent: 13 January 2009 16:31 To: Sklyar, Oleg (London) Cc: r-devel@r-project.org Subject: Re: [Rd] particulars of importing/loading libraries Hi Oleg -- Sklyar, Oleg (London) oskl...@maninvestments.com writes: Dear List: Sorry for posting maybe a trivial question

Re: [Rd] handling a matrix and .C

2008-12-01 Thread Sklyar, Oleg (London)
You should not have started with R/C API without reading this (first link in google): Writing R Extensions. For your particular question you want pages 72+ and sections 5.9.3 and 5.9.4, possibly further as well Dr Oleg Sklyar Research Technologist AHL / Man Investments Ltd +44 (0)20 7144 3107

[Rd] POSIXlt getting sec element at 60 when converting from POSIXct

2008-10-14 Thread Sklyar, Oleg (London)
In some cases rounding problems lead to creation of logically incorrect times in POSIXlt when converting from POSIXct. ## everything works fine for the following values: x = c(1223972160.0, 1223982660.0, 1223994660.) ## adding 0s for the epoch x = x + as.POSIXct(1970-01-01 00:00) -

Re: [Rd] Extract method for a new class

2008-09-22 Thread Sklyar, Oleg (London)
You will need to define several for different combinations of i and j types e.g. ANY,missing; ANY,ANY; missing,ANY or possibly for types like integer, character and logical more or less in the following way: setMethod([, signature(x=haplogList, i=ANY,j=ANY), function(x, i, j, ...,

[Rd] 'xtfrm' performance (influences 'order' performance) in R devel

2008-09-09 Thread Sklyar, Oleg (London)
Hello everybody, it looks like the presense of some (do know know which) S4 methods for a given S4 class degrades the performance of xtfrm (used in 'order' in new R-devel) by a factor of millions. This is for classes that ARE derived from numeric directly and thus should be quite trivial to

Re: [Rd] 'xtfrm' performance (influences 'order' performance) in R devel

2008-09-09 Thread Sklyar, Oleg (London)
3107 [EMAIL PROTECTED] -Original Message- From: John Chambers [mailto:[EMAIL PROTECTED] Sent: 09 September 2008 15:11 To: Sklyar, Oleg (London) Cc: R-devel@r-project.org Subject: Re: [Rd] 'xtfrm' performance (influences 'order' performance) in R devel No definitive answers

Re: [Rd] 'xtfrm' performance (influences 'order' performance) in R devel

2008-09-09 Thread Sklyar, Oleg (London)
Oleg Sklyar Research Technologist AHL / Man Investments Ltd +44 (0)20 7144 3107 [EMAIL PROTECTED] -Original Message- From: John Chambers [mailto:[EMAIL PROTECTED] Sent: 09 September 2008 15:11 To: Sklyar, Oleg (London) Cc: R-devel@r-project.org Subject: Re: [Rd] 'xtfrm' performance

Re: [Rd] 'xtfrm' performance (influences 'order' performance) in R devel

2008-09-09 Thread Sklyar, Oleg (London)
a reference to xtfrm and thus would not cause this infinite loop Dr Oleg Sklyar Research Technologist AHL / Man Investments Ltd +44 (0)20 7144 3107 [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sklyar, Oleg (London) Sent: 09 September

Re: [Rd] 'xtfrm' performance (influences 'order' performance) in R devel

2008-09-09 Thread Sklyar, Oleg (London)
To: Sklyar, Oleg (London) Cc: R-devel@r-project.org Subject: Re: [Rd] 'xtfrm' performance (influences 'order' performance) in R devel Sklyar, Oleg (London) wrote: Ha, defined xtfrm for TimeDate, works instantly (xtfrm is already a method). However, it won't be taken up by order

[Rd] incorrect ticks in plot(with xlim/ylim) and matplot in R2.7.2, R2.8.0

2008-09-04 Thread Sklyar, Oleg (London)
Dear Martin, I understand the reasons behind PDF removal, but I actually added a description of the problem with R2.7+ before... (I cannot select which email client I use in the office). Now the problem remains and here is the illustration. The reason for setting xlim beyond the data range can

[Rd] patch for graphics/R/plot.R that fixes incorrect tick positions

2008-09-04 Thread Sklyar, Oleg (London)
As I haven't got any replies to my earlier posts about incorrect tick positions in plot and matplot, here is the simplest patch to correct this issue (it fixes both plot with xlim/ylim and matplot). The plot.R was unchanged between 2.7 and current R-devel. It would be great if the patch could be

[Rd] ugly plots with xlim/ylim exceeding data range (changed since R2.6.1)

2008-09-03 Thread Sklyar, Oleg (London)
The behaviour of the plot function when used with xlim/ylim and the matplot function as in the following simple example changed between R2.6.1 and 2.7.0+ producing ugly plots in the new versions. In case of plot it looks like the pretty function is called with wrong arguments (i.e. range of

[Rd] showMethods(plot, printTo=FALSE) fails if printTo set to FALSE

2008-08-20 Thread Sklyar, Oleg (London)
Hi everybody, any idea why showMethods fails with the following error when printTo is set to false, i.e. to return the output as a character vector. It works fine if printTo is left default as seen below. The behaviour is consistent for any method I tried. stdin() generally works fine on this

Re: [Rd] showMethods(plot, printTo=FALSE) fails if printTo set to FALSE

2008-08-20 Thread Sklyar, Oleg (London)
Thanks for a good tip. Dr Oleg Sklyar Technology Group Man Investments Ltd +44 (0)20 7144 3803 [EMAIL PROTECTED] -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: 20 August 2008 13:29 To: Sklyar, Oleg (London) Cc: [EMAIL PROTECTED] Subject: Re: [Rd

Re: [Rd] Clash between 'Cairo' and 'EBImage' packages on Windows

2008-07-21 Thread Sklyar, Oleg (London)
EBImage is dynamically linked against GTK, which includes cairo libraries, so those are installed along with GTK. Cairo seems to be statically linking to libcairo.dll.a. I would assume that if it is linked statically it should not get confused with a shared library present elsewhere in the path,

Re: [Rd] Clash between 'Cairo' and 'EBImage' packages on Windows

2008-07-21 Thread Sklyar, Oleg (London)
July 2008 11:29 To: Sklyar, Oleg (London) Cc: Henrik Bengtsson; R-devel Subject: Re: [Rd] Clash between 'Cairo' and 'EBImage' packages on Windows On Mon, 21 Jul 2008, Sklyar, Oleg (London) wrote: EBImage is dynamically linked against GTK, which includes cairo libraries, so those