[Rd] package post install instructions

2009-07-02 Thread Romain Francois
Hello, I've looked in tools:::.install_packages for some sort of hook that would let packages developers point to further instructions after a package is installed. For example, some packages need to setup environment variables, ... Is there something I have missed ? Romain -- Romain

Re: [Rd] Conditional dependency between packages

2009-07-02 Thread Jon Olav Skoien
Hi Seth, And thanks for your suggestion! I was not able to do exactly what you described (I have no earlier experience with using environments), but you mentioning .onLoad was a good starting point. I have now removed all references to pkg1 from the NAMESPACE, and wrote the following .onLoad

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

2009-07-02 Thread Martin Morgan
Troy Robertson wrote: Well... My performance problems were in the pass-by-value semantics of R. I have just changed my classes to inherit from .environment and then moved data members from S4 slots to the .xData objects as Martin suggested. Actually, I had hoped the take-home message

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

2009-07-02 Thread Gabor Grothendieck
On Thu, Jul 2, 2009 at 1:37 AM, Troy Robertsontroy.robert...@aad.gov.au wrote: Well... My performance problems were in the pass-by-value semantics of R. I have just changed my classes to inherit from .environment and then moved data members from S4 slots to the .xData objects as Martin

[Rd] OOP performance, was: V2.9.0 changes

2009-07-02 Thread Thomas Petzoldt
Hi Troy, first of all a question, what kind of ecosystem models are you developing in R? Differential equations or individual-based? Your write that you are a frustrated Java developer in R. I have a similar experience, however I still like JAVA, and I'm now more happy with R as it is much more

Re: [Rd] Conditional dependency between packages

2009-07-02 Thread Henrik Bengtsson
if (pkg1 %in% rownames(utils:::installed.packages()) ) { library(pkg1) ... } can be replaced by: if (require(pkg1)) { ... } /Henrik On Thu, Jul 2, 2009 at 5:29 AM, Jon Olav Skoienj.sko...@geo.uu.nl wrote: Hi Seth, And thanks for your suggestion! I was not able to do exactly what you

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

2009-07-02 Thread Troy Robertson
-Original Message- From: Martin Morgan [mailto:mtmor...@fhcrc.org] Sent: Thursday, 2 July 2009 10:58 PM To: Troy Robertson Cc: 'r-devel@R-project.org' Subject: Re: [Rd] V2.9.0 changes [Sec=Unclassified] Troy Robertson wrote: Well... My performance problems were in the

Re: [Rd] OOP performance, was: V2.9.0 changes [SEC=Unclassified]

2009-07-02 Thread Troy Robertson
Hi Thomas, It is a population-based model, but I didn't develop the work. I am just the programmer who has been given the job of coding it. The goal is to allow for a plug and play type approach by users to construction of the model (of both elements and functionality). Hence my focus on

Re: [Rd] [R] ggplot2 x axis question

2009-07-02 Thread Deepayan Sarkar
On Mon, Jun 29, 2009 at 9:05 AM, hadley wickhamh.wick...@gmail.com wrote: In that case, try: qplot(reorder(factor(model),delta),delta,data=growthm.bic) Deepayan: do you think there should also be a numeric method for reorder? r-devel now has a reorder.default (replacing reorder.factor and

Re: [Rd] OOP performance, was: V2.9.0 changes

2009-07-02 Thread Gabor Grothendieck
In terms of performance if you want the fastest performance in R go with S3 and if you want even faster performance rewrite your inner loops in C. All the other approaches will usually be slower. Also S3 is simple, elegant and will result in less code and take you much less time to design,

Re: [Rd] OOP performance, was: V2.9.0 changes [SEC=Unclassified]

2009-07-02 Thread Troy Robertson
Hi Gabor, Look, I agree with you about S3 and have at times wished I had chosen that path rather than S4. It seems to do the things I struggle to find answers for with S4. But..., knowing little about R before engaging with this project, I decided to go with the latest OO framework, S4. I