Re: [R-pkg-devel] Storing Data Used in an Example

2017-09-20 Thread Roy Mendelssohn - NOAA Federal
Thanks. -Roy > On Sep 20, 2017, at 9:37 AM, Joshua Ulrich wrote: > > On Wed, Sep 20, 2017 at 11:32 AM, Roy Mendelssohn - NOAA Federal > wrote: >> Hi All: >> >> I have a package whose main function is to download environmental data using >> a service. I have added some plot routines, As it

Re: [R-pkg-devel] loadMethod() not available with Rscript

2017-09-20 Thread Martyn Plummer
On Wed, 2017-09-20 at 09:45 -0500, Dirk Eddelbuettel wrote: > Thierry, > > This has always been a considerable puzzle, and the source of some amusement, > to me. It is a clear design bug in Rscript because _code that would > otherwise work_ will not if it happens to rely on library(methods). S4 c

Re: [R-pkg-devel] Storing Data Used in an Example

2017-09-20 Thread Joshua Ulrich
On Wed, Sep 20, 2017 at 11:32 AM, Roy Mendelssohn - NOAA Federal wrote: > Hi All: > > I have a package whose main function is to download environmental data using > a service. I have added some plot routines, As it is, my examples of just > the downloads push the CRAN limits on time, so I wan

[R-pkg-devel] Storing Data Used in an Example

2017-09-20 Thread Roy Mendelssohn - NOAA Federal
Hi All: I have a package whose main function is to download environmental data using a service. I have added some plot routines, As it is, my examples of just the downloads push the CRAN limits on time, so I want the plot examples to use data that has already been downloaded and stored as pa

Re: [R-pkg-devel] loadMethod() not available with Rscript

2017-09-20 Thread Dirk Eddelbuettel
Thierry, This has always been a considerable puzzle, and the source of some amusement, to me. It is a clear design bug in Rscript because _code that would otherwise work_ will not if it happens to rely on library(methods). S4 comes to mind. This has also been answered at least a few times on SO

Re: [R-pkg-devel] loadMethod() not available with Rscript

2017-09-20 Thread Thierry Onkelinx
Dear Joshua, Thanks for your prompt reply. I had a look at all dependencies and none of them use loadMethod(). So the culprit is probably one of their dependencies. What would be the best way to deal with this? add library(methods) to the script or import loadMethod() via the NAMESPACE? Best re

Re: [R-pkg-devel] loadMethod() not available with Rscript

2017-09-20 Thread Joshua Ulrich
Hi Thierry, On Wed, Sep 20, 2017 at 7:45 AM, Thierry Onkelinx wrote: > Dear all, > > Could someone explain this to me? I have a simple script (see below). > my_function() is an S4 method. The package imports all functions from > methods that it uses. > > When I run the script in a vanilla R sessi

[R-pkg-devel] loadMethod() not available with Rscript

2017-09-20 Thread Thierry Onkelinx
Dear all, Could someone explain this to me? I have a simple script (see below). my_function() is an S4 method. The package imports all functions from methods that it uses. When I run the script in a vanilla R session it works. When using Rscript I get the error: Error in loadMethod(function (x, .