Encountered an error in scripting, which can be reproduced using Rscript as
follows:

$ Rscript -e "library(httr); handle('http://cran.r-project.org')"

Error in getCurlHandle(cookiefile = cookie_path, .defaults = list()) :
  could not find function "getClass"
Calls: handle -> getCurlHandle

or by starting R without the methods package attached:

$ R_DEFAULT_PACKAGES=base R
[snip]
> library(httr)
> handle('http://cran.fhcrc.org/')
Error in getCurlHandle(cookiefile = cookie_path, .defaults = list()) :
  could not find function "getClass"

As far as I can tell the error occurs when getCurlHandle .Calls a C
function which then calls SET_CLASS, which (I guess) requires
methods::setClass to be in the search path.

Now 'httr' Imports 'RCurl' which Depends on 'methods'. So I think
`library(httr)` should end up attaching 'methods' to the search path, but
it seems 'methods' is just imported to RCurl's namespace.

I think this is a problem since the Depends line is indicating that
'methods' must be attached for RCurl to work, whether or not RCurl itself
is being attached.

Peter

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to