Re: [Rd] plot(type="l") disjoint between 100 and 101st datapoint

2008-06-27 Thread Sklyar, Oleg (MI London)
No, it does not happen here and I tested other ranges as well. Dr Oleg Sklyar Technology Group Man Investments Ltd +44 (0)20 7144 3803 [EMAIL PROTECTED] > -Original Message- > From: Richard Martin [mailto:[EMAIL PROTECTED] > Sent: 27 June 2008 15:32 > To: Sklyar, Oleg (MI

Re: [Rd] plot(type="l") disjoint between 100 and 101st datapoint

2008-06-27 Thread Sklyar, Oleg (MI London)
I do not see any disjoint on 2.7.0 patched (r45879) or 2.8.0 devel (r45830) on RHEL5 64bit. Dr Oleg Sklyar Technology Group Man Investments Ltd +44 (0)20 7144 3803 [EMAIL PROTECTED] > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Richard Martin >

Re: [Rd] Rmpi segfault after install on Ubuntu Hardy Heron

2008-06-11 Thread Sklyar, Oleg (MI London)
Does Rmpi work with OpenMPI at all? It calls lamboot on load from LAM MPI. I would think that mpi_initialize calls a shared library function from LAM MPI which simply does not exist in OpenMPI or which does something different from what it expects. If you ever make Rmpi working with OpenMPI I would

Re: [Rd] Problem with R or fBasics Package (PR#11495)

2008-05-21 Thread Sklyar, Oleg (MI London)
It's not a problem with R, it's just fBasics is buggy! It overrides log and round. Please contact the maintainer of the fBasics package. Dr Oleg Sklyar Technology Group Man Investments Ltd +44 (0)20 7144 3803 [EMAIL PROTECTED] > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EM

Re: [Rd] \S4method in combination with "[" and "[<-"

2008-05-21 Thread Sklyar, Oleg (MI London)
For the $ operator defined as S4 method, \S4method does not work as well. However, the following clauses let it through the check w/o warnings or errors: \alias{$,character-method} \alias{$<-,character,ANY-method} \usage{ ## S4 methods for signature 'MyClass,character' x$name x$name <

[Rd] 'cat' and 'write' as generic, just like 'c', 'cbind' etc?

2008-05-13 Thread Sklyar, Oleg (MI London)
Dear list: is there any good reason why 'c', 'cbind', 'rbind' etc (all defined as 'function(..., )') are generic and thus methods can be defined whereas such quite useful functions like 'cat' and 'write' are not? Would it not be reasonable to add such functionality? This would allow to define S3

Re: [Rd] Linux installation

2008-05-09 Thread Sklyar, Oleg (MI London)
Michael: 1) this IS a wrong list for such questions. You mention r-help, but this is Rd (developers) and your question is completely unrelated to the topics of the list! 2) In Linux, any time you want to compile anything against anything and using binary distributions you need *-devel or *-dev pac

Re: [Rd] optional setValidity()

2008-05-07 Thread Sklyar, Oleg (MI London)
sorry I forgot the return statement, it should be if ([EMAIL PROTECTED]) return(TRUE) Dr Oleg Sklyar Technology Group Man Investments Ltd +44 (0)20 7144 3803 [EMAIL PROTECTED] > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Sklyar, &

Re: [Rd] optional setValidity()

2008-05-07 Thread Sklyar, Oleg (MI London)
You could add a flag to your class and check if it set as a first thing in the validity as in the example below: setClass("foo", representation("numeric", .validate="logical"), prototype(.validate=TRUE), validity=function(object) { if ([EMAIL PROTECTED]) TRUE ## do lengthy checks

Re: [Rd] S4: what to put in initialize, validity and constructor?

2008-05-02 Thread Sklyar, Oleg (MI London)
setClass("A", representation(a="numeric",b="numeric"), validity = function(object) { if (length([EMAIL PROTECTED])!=length([EMAIL PROTECTED])) return("different lengths of a and b") if (length([EMAIL PROTECTED])==0) return("object length is zero") TRUE } ) Do not chan

Re: [Rd] reproducible segmentation fault caused by textConnection()

2008-04-29 Thread Sklyar, Oleg (MI London)
Hi Tony, Greg. I get the same as Greg's: segfault *** R version 2.7.0 (2008-04-22) [/research/osklyar/R-2.7.0] *** > sessionInfo() R version 2.7.0 (2008-04-22) x86_64-unknown-linux-gnu locale: LC_CTYPE=en_GB;LC_NUMERIC=C;LC_TIME=en_GB;LC_COLLATE=C;LC_MONETARY=C;LC_ MESSAGES=en_GB;LC_PAPER=en_GB;

Re: [Rd] plot(x) in 2.7.0 (with y=NULL) proposed code correction

2008-04-22 Thread Sklyar, Oleg (MI London)
pril 2008 17:55 > To: Sklyar, Oleg (MI London) > Cc: R-devel@r-project.org > Subject: Re: plot(x) in 2.7.0 (with y=NULL) proposed code correction > > >>>>> "OlegS" == Sklyar, Oleg \(MI London\) > <[EMAIL PROTECTED]> > >>>>> o

[Rd] plot(x) in 2.7.0 (with y=NULL) proposed code correction

2008-04-22 Thread Sklyar, Oleg (MI London)
Hi all: following the previous discussion, it looks like plot(x) with y=NULL still does not work correctly. If one tries for example plot(1:5) it works, but already for plot(runif(100)) it does not. I posted the proposed correction for plot.POSIXct and plot.POSIXlt before. Please voice your opinio

Re: [Rd] graphics::Axis loosing S3/S4 class attributes of 'x' in 2.7.0 RC

2008-04-22 Thread Sklyar, Oleg (MI London)
t(1:100,x) plot(as.POSIXlt(x)) plot(as.POSIXlt(x),1:100) plot(1:100,as.POSIXlt(x)) Dr Oleg Sklyar Technology Group Man Investments Ltd +44 (0)20 7144 3803 [EMAIL PROTECTED] > -----Original Message- > From: Duncan Murdoch [mailto:[EMAIL PROTECTED] > Sent: 22 April 2008 14:24 > To

Re: [Rd] graphics::Axis loosing S3/S4 class attributes of 'x' in 2.7.0 RC

2008-04-22 Thread Sklyar, Oleg (MI London)
PROTECTED] > -Original Message- > From: Duncan Murdoch [mailto:[EMAIL PROTECTED] > Sent: 22 April 2008 14:24 > To: Sklyar, Oleg (MI London) > Cc: R-devel@r-project.org > Subject: Re: [Rd] graphics::Axis loosing S3/S4 class > attributes of 'x' in 2.7.0 RC > >

Re: [Rd] graphics::Axis loosing S3/S4 class attributes of 'x' in 2.7.0 RC

2008-04-22 Thread Sklyar, Oleg (MI London)
w don't work > properly. It seems more logical to define plot.whatever > to handle the object in question, i.e. we do define plot.zoo, > whereas only the Axis method ought to be required for the X > and Y coordinate axes. > > On Tue, Apr 22, 2008 at 8:53 AM, Sklyar, O

Re: [Rd] graphics::Axis loosing S3/S4 class attributes of 'x' in 2.7.0 RC

2008-04-22 Thread Sklyar, Oleg (MI London)
age- > From: Duncan Murdoch [mailto:[EMAIL PROTECTED] > Sent: 22 April 2008 13:01 > To: Sklyar, Oleg (MI London) > Cc: R-devel@r-project.org > Subject: Re: [Rd] graphics::Axis loosing S3/S4 class > attributes of 'x' in 2.7.0 RC > > On 22/04/2008 7:25 AM, Sklyar, Ole

Re: [Rd] graphics::Axis loosing S3/S4 class attributes of 'x' in 2.7.0 RC

2008-04-22 Thread Sklyar, Oleg (MI London)
och [mailto:[EMAIL PROTECTED] > Sent: 22 April 2008 13:01 > To: Sklyar, Oleg (MI London) > Cc: R-devel@r-project.org > Subject: Re: [Rd] graphics::Axis loosing S3/S4 class > attributes of 'x' in 2.7.0 RC > > On 22/04/2008 7:25 AM, Sklyar, Oleg (MI London) wrote: &

[Rd] graphics::Axis loosing S3/S4 class attributes of 'x' in 2.7.0 RC

2008-04-22 Thread Sklyar, Oleg (MI London)
Following my previous post on S3 method despatch, I put debug messages in the code of Axis, Axis.default and plot.default in graphics/R/axis.R and graphics/R/plot.R to print the class of x, at and y on plot. After recompiling R, what I see is that x *lost* its class attribute (at least for classes

[Rd] S3 method despatch (changed between 2.6.2 and 2.7.0 RC?)

2008-04-22 Thread Sklyar, Oleg (MI London)
Dear developers: I have observed a change in the behaviour of S3 method despatch (as I guess related to namespaces) between 2.6.2 and yesterday's 2.7.0 RC and would be grateful if you could comment on that: the 'Axis' function in the 'graphics' namespace calls UseMethod("Axis",x), internally to d

Re: [Rd] ISOdate/ISOdatetime performance suggestions, other date/time questions

2008-04-10 Thread Sklyar, Oleg (MI London)
age- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Sklyar, > Oleg (MI London) > Sent: 10 April 2008 14:52 > To: R-devel@r-project.org > Subject: [Rd] ISOdate/ISOdatetime performance suggestions, > other date/time questions > > Dear list: > &

[Rd] ISOdate/ISOdatetime performance suggestions, other date/time questions

2008-04-10 Thread Sklyar, Oleg (MI London)
Dear list: working with date/times I have come across a problem that ISOdate and ISOdatetime are too slow on large vectors of data. I was surprised just until I looked at the implementation and the man page: "ISOdatetime and ISOdate are convenience wrappers for strptime". In other terms, they conv

Re: [Rd] Overriding axis formatting with custom Axis method, Axis.numeric etc

2008-04-07 Thread Sklyar, Oleg (MI London)
Dear Prof Ripley, thank you for your suggestions, they are as always very insightful! Although, anybody can miss a point or two as I just did in namespaces. Is the following correct? Until redefined in the current namespace, plot.default (and all other plot.* methods) being defined in 'graphics'

[Rd] Overriding axis formatting with custom Axis method, Axis.numeric etc

2008-04-07 Thread Sklyar, Oleg (MI London)
Dear list: I would like to override the default way R formats plot axes with a custom method(s). Obviously I would prefer to define it as general as possible avoiding writing a custom method for each individual class where possible. The plot.default method (and I assume other methods as well) cal

Re: [Rd] "[<-" plus drop-type extra argument

2008-04-02 Thread Sklyar, Oleg (MI London)
Robin: two points: first for convenience and performance it has sense to derive your class from numeric rather than introduce a numeric slot, i.e. setClass("foo", representation( "numeric", NC="numeric" ), prototype( NC=NA_real_ ) ) or setClass("foo", representation(

[Rd] as.POSIXct/as.POSIXlt generics

2008-03-26 Thread Sklyar, Oleg (MI London)
Hi, I am trying to define the as.POSIXct as an S4 method for one of my classes. Trying to define a generic, I am getting an error that it is already differently defined in base. However, if I query for it, there is no definition. Being in base, I also cannot really import it. If I define methods w