Thanks a lot  and sorry for posting to the wrong group. 
This is the first time Rscript behaves differently than interactive R . 
ce


-----Original Message-----
From: "Robert Harlow" [[email protected]]
Date: 01/21/2014 08:38 AM
To: "Paul Teetor" <[email protected]>
CC: "[email protected]" <[email protected]>
Subject: Re: [R-SIG-Finance] Quandl error: Error in getCurlHandle() : could
 not find function &quot;getClass&quot;

It looks like Rscript loads your .Rprofile file on startup, which is located in 
~/.Rprofile.  You could just add library(methods) to your .Rprofile file and it 
should fix the issue.

http://stackoverflow.com/questions/19680462/rscript-does-not-load-methods-package-r-does-why-and-what-are-the-consequen


-Bob





On Sun, Jan 19, 2014 at 11:25 PM, Paul Teetor <[email protected]> wrote:
Youre problem is not related to Quandl (or finance). When you run Rscript, it 
does not automatically load all the same packages loaded by the interactive 
window. In particular, Rscript does not automatically load the methods package 
(which defines getClass), so the R interpreter cannot find the getClass 
function.

As far as I know, the solution is to manually load all the required packages, 
including methods. Perhaps someone wiser than me can suggest an easier solution.
 
Paul Teetor, Elgin, IL  USA
http://quantdevel.com/public


________________________________
 From: ce <[email protected]>
To: [email protected]
Sent: Sunday, January 19, 2014 8:26 PM
Subject: [R-SIG-Finance] Quandl error: Error in getCurlHandle() : could not     
find function "getClass"



Hi all,

Following script with Rscript doesnt work. but if I copy paste in R 
intera[[elided Yahoo spam]]

#!/usr/bin/Rscript
library(Quandl)
#
token <- Quandl.auth(".....")     # Please put your own token
Quandl.auth(token)                           

A <- Quandl("QUANDL/ARS",start_date="1990-01-01" )
print(A)


Error in getCurlHandle() : could not find function "getClass"
Calls: Quandl -> getURL -> curlPerform -> getCurlHandle -> .Call

_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

        [[alternative HTML version deleted]]


_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Reply via email to