Re: [Rd] overwriting '<-' and infinite recursions

2009-01-23 Thread Tony Plate
I wonder if you might be able to make use of R's "active bindings." These enable you to set things up so that a user definable function is called when an assignment is made or when a value is accessed. It's sort of like overriding assignment for a particular variable, but you don't need to me

Re: [Rd] overwriting '<-' and infinite recursions

2009-01-23 Thread luke
On Fri, 23 Jan 2009, Yi Zhang wrote: Thanks, Luke. I would certainly be very happy to see any non-intrusive solution. The problem I'm dealing with is: I'm creating a new class which references some external resource (file or database) and I want to make the reference counting work. An example (-

Re: [Rd] "for" loop wiht S4 Objects

2009-01-23 Thread Douglas Bates
On Fri, Jan 23, 2009 at 1:25 AM, Biczok Rudolf wrote: > Hi all, > I'm working with the S4-Class system and I have a little problem with > Implementing iteration functionality in my S4 class but it don't work: >> setClass("foo",representation(bar="list")) >> x <- new("foo",bar=list(1,2,3)) >>for

Re: [Rd] overwriting '<-' and infinite recursions

2009-01-23 Thread Yi Zhang
Thanks, Luke. I would certainly be very happy to see any non-intrusive solution. The problem I'm dealing with is: I'm creating a new class which references some external resource (file or database) and I want to make the reference counting work. An example (-> means references): Initially we have s

Re: [Rd] overwriting '<-' and infinite recursions

2009-01-23 Thread luke
While it _may_ be possible to make this work in current R (I don't know if it is) this is a Really Bad Idea as it will affect every other piece of R code run on the system. It also may not work at all in future versions of R (assignment is sufficiently core functionality that it may not be impleme

[Rd] overwriting '<-' and infinite recursions

2009-01-23 Thread Yi Zhang
Hello all, I'm having a problem when overwriting the '<-' function and was told I'd better post it here for help. The reason why I need to overwrite it is complicated and not easy to tell in a few words; but this seems the only clean option other than hacking R's core source code. My code looks li

Re: [Rd] loading RBlas.dll

2009-01-23 Thread Antonio, Fabio Di Narzo
hi, whoever you are (I've seen no signature), 2009/1/22 sachin1234 : > > hi everyone, > > Im implementing a new RBlas dll but just for optimising sake i need to know > how and WHERE (which source code) RBlas gets loaded. there is a call to > loadlibrary() in dynload.c BUT it seems this is not the

[Rd] "for" loop wiht S4 Objects

2009-01-23 Thread Biczok Rudolf
Hi all, I'm working with the S4-Class system and I have a little problem with Implementing iteration functionality in my S4 class but it don't work: > setClass("foo",representation(bar="list")) > x <- new("foo",bar=list(1,2,3)) >for(e in x) cat(e) invalid type/length (S4/1) in ve

[Rd] loading RBlas.dll

2009-01-23 Thread sachin1234
hi everyone, Im implementing a new RBlas dll but just for optimising sake i need to know how and WHERE (which source code) RBlas gets loaded. there is a call to loadlibrary() in dynload.c BUT it seems this is not the function that is loading Rblas. how do i know this? well i added the code :(ju

Re: [Rd] row.names in data.frame with row.names NULL

2009-01-23 Thread Yetta Jager
In response to the Aug 20 posting by Vadim, I had the same issue with all kinds of complaints about row.names when it was not given in the read.table command; when it was set to NULL (data were actually shifted to the wrong names). I believe the problem was no comma (or specified delimiter) at

Re: [Rd] Italics in svg output display as bold (PR#13463)

2009-01-23 Thread Yan Wong
On 22 Jan 2009, at 11:58, Brian D Ripley wrote: It is a bug on your system: this is done by cairographics, and I suspect that the version you have is broken (or possibly your viewer). I'll attach the version I get, which does display in italics on my system. Thanks for that. I do see italic

[Rd] Package impute exist in quite different version on CRAN and BioC

2009-01-23 Thread Henrik Bengtsson
[CC:ing package maintainer of 'impute' package and crossposting to r-devel and bioc-devel because this affects both audiences] Hi, the 'impute' package is published both on CRAN and Bioconductor; http://cran.r-project.org/web/packages/impute/ http://bioconductor.org/packages/2.3/bioc/html/impu

Re: [Rd] pass by reference for S4

2009-01-23 Thread Martin Morgan
"Biczok Rudolf" writes: > Hi all; > > > Is it possible to modify the "@" operator that it can handle references > (or external pointers) R has the notion of an external pointer, which is a pointer to C-level data. Is that what you mean? See ?"externalptr-class" and the 'Writing R Extensions' ma

Re: [Rd] str(<1d-array>)

2009-01-23 Thread Marc Schwartz
on 01/23/2009 07:36 AM Martin Maechler wrote: >> "TP" == Tony Plate >> on Thu, 22 Jan 2009 11:01:21 -0700 writes: > > TP> Martin Maechler wrote: > >>> "TP" == Tony Plate > >>> on Fri, 16 Jan 2009 13:10:04 -0700 writes: > >>> > >> > TP> Martin Mae

Re: [Rd] str(<1d-array>)

2009-01-23 Thread Martin Maechler
> "TP" == Tony Plate > on Thu, 22 Jan 2009 11:01:21 -0700 writes: TP> Martin Maechler wrote: >>> "TP" == Tony Plate >>> on Fri, 16 Jan 2009 13:10:04 -0700 writes: >>> >> TP> Martin Maechler wrote: >> >>> "PatB" == Patrick Burns >> >>