Re: [Rd] C headers

2014-02-11 Thread Adrian Dușa
Apologies for my late reply, I've been away for a few days. Everything is working fine now, thank you again for your advice. Best wishes, Adrian On Thu, Feb 6, 2014 at 10:49 AM, Adrian Dușa wrote: > Dear list, > > Just upgraded to MacOS Mavericks, fresh install of R 3.0.2 and trying to > insta

Re: [Rd] $new cannot be accessed when running from Rscript and methods package is not loaded

2014-02-11 Thread Winston Chang
To state the issue that Kirill raised in a different way... A package with S4 or reference classes and Depends:methods can throw an error when you do something as simple as this: Rscript -e "mypackage::foo()" But this will work: Rscript -e "library(mypackage); foo()" This is because when mypa

[Rd] getting environment from "top" promise

2014-02-11 Thread Michael Lawrence
Hi all, It seems that there is a use case for obtaining the environment for the "top" promise. By "top", I mean following the promise chain up the call stack until hitting a non-promise. S4 data containers often mimic the API of base R data structures. This means writing S4 methods for functions

Re: [Rd] $new cannot be accessed when running from Rscript and methods package is not loaded

2014-02-11 Thread Duncan Murdoch
On 11/02/2014 12:06 PM, Winston Chang wrote: To state the issue that Kirill raised in a different way... A package with S4 or reference classes and Depends:methods can throw an error when you do something as simple as this: Rscript -e "mypackage::foo()" But this will work: Rscript -e "libr

Re: [Rd] $new cannot be accessed when running from Rscript and methods package is not loaded

2014-02-11 Thread Martin Morgan
On 02/11/2014 09:06 AM, Winston Chang wrote: To state the issue that Kirill raised in a different way... A package with S4 or reference classes and Depends:methods can throw an error when you do something as simple as this: Rscript -e "mypackage::foo()" But this will work: Rscript -e "libr

Re: [Rd] $new cannot be accessed when running from Rscript and methods package is not loaded

2014-02-11 Thread Simon Urbanek
On Feb 11, 2014, at 1:28 PM, Martin Morgan wrote: > On 02/11/2014 09:06 AM, Winston Chang wrote: >> To state the issue that Kirill raised in a different way... A package >> with S4 or reference classes and Depends:methods can throw an error >> when you do something as simple as this: >> Rscrip

Re: [Rd] getting environment from "top" promise

2014-02-11 Thread Romain Francois
Hello, We have something very similar to your while loop in dplyr. https://github.com/hadley/dplyr/blob/02a609310184d003c2ae9e0c013bfa69fa4d257a/inst/include/tools/DataDots.h#L15 because we need to know exactly in which environment a promise is supposed to be evaluated, even though we might co