Re: [Rd] V2.9.0 changes [Sec=Unclassified]

2009-06-23 Thread Troy Robertson
Yes, I had looked at R.oo, S4 and proto before beginning coding. I had initially assumed that S4 was an enhancement of or replacement to R.oo that was implemented at a lower level and had decided to go with the 'future' of OO in R. These assumptions were not necessarily correct. Troy Troy Robe

[Rd] loadNamespace and useDynLib

2009-06-23 Thread Kasper Daniel Hansen
I am considering a package with a namespace (Rgraphviz from Bioc). I essentially want to have some error handling for loading the dll, something like wrapping it into tryCatch or similar (reason: see below). Right now I am loading the dynamic libraries by useDynLib in my NAMESPACE file. Whe

[Rd] Documentation/software inconsistency in `:` and seq

2009-06-23 Thread Stavros Macrakis
In 2.8.1/Windows: According to ? : Details: For numeric arguments 'from:to' is equivalent to 'seq(from, to)' ... Value: For numeric arguments, a numeric vector. This will be of type 'integer' if 'from' and 'to' are both integers and representable in the integer typ

Re: [Rd] Accessing an object from the function in its .Data slot?

2009-06-23 Thread luke
sys.function might be useful. luke On Tue, 23 Jun 2009, Duncan Murdoch wrote: Martin Kober wrote: I have an S4 object extending "function". Is it there a good way to access the object (resp. its slots) from within the function in .Data? I don't think so. That's not really the way the S4 o

Re: [Rd] V2.9.0 changes [Sec=Unclassified]

2009-06-23 Thread Martin Morgan
Troy Robertson wrote: > Hi all, > > > > Prefix: I am a frustrated Java coder in R. ah good, if you're frustrated with Java you'll find R very different ;) > > > > I am coding a medium sized ecosystem modelling program in R. I have changed > to using S4 objects and it has cost me an order

Re: [Rd] Accessing an object from the function in its .Data slot?

2009-06-23 Thread Martin Morgan
Duncan Murdoch wrote: > Martin Kober wrote: >> I have an S4 object extending "function". Is it there a good way to >> access the object (resp. its slots) from within the function in .Data? >> > > I don't think so. That's not really the way the S4 object system is > designed to work. If a func

Re: [Rd] Accessing an object from the function in its .Data slot?

2009-06-23 Thread Duncan Murdoch
Martin Kober wrote: I have an S4 object extending "function". Is it there a good way to access the object (resp. its slots) from within the function in .Data? I don't think so. That's not really the way the S4 object system is designed to work. If a function needs access to an object, the

[Rd] Accessing an object from the function in its .Data slot?

2009-06-23 Thread Martin Kober
I have an S4 object extending "function". Is it there a good way to access the object (resp. its slots) from within the function in .Data? If I'm reading help files correctly, it is not possible to overload '(' (which would be the most elegant solution, I suppose). I can enclose the slotted data

Re: [Rd] Floating point precision / guard digits? (PR#13771)

2009-06-23 Thread Dr. D. P. Kreil
Dear Liviu, That's very helpful, thank you! With best regards, David 2009/6/22 Liviu Andronic : > On 6/20/09, Dr. D. P. Kreil wrote: >>  you can suggest an online resource to help me use the right vocabulary >>  and better understand the fundamental concepts, I am of course >> > There is in R t

Re: [Rd] V2.9.0 changes [Sec=Unclassified]

2009-06-23 Thread Antonio, Fabio Di Narzo
Not a direct answer to your question, but... You might consider using the R.oo package, from H. Bengtsson. It's very stable, written in pure R, and cleanly allows you to do pass-by-reference OO programming, with no tricks. HTH, af 2009/6/23 Troy Robertson : > Hi all, > > > > Prefix: I am a frustr