0
GSPC <- as.xts(get.hist.quote("^GSPC",start="1970-01-02", quote=c("Open", "High", "Low", "Close","Volume","AdjClose")))

Error in get.hist.quote("^GSPC", start = "1970-01-02", quote = c("Open", : could not find function "get.hist.quote"

Ronak Shah
  • 377,200
  • 20
  • 156
  • 213
user10769166
  • 39
  • 1
  • 7
  • 2
    I guess `get.hist.quote` is from package `tseries`, have you installed the package and loaded in your environment with `library(tseries)`? – Ronak Shah Feb 03 '20 at 10:28
  • This works: `GSPC <- tseries::get.hist.quote(instrument="^GSPC", start= "1970-01-02", end="2020-01-31", quote=c("Open", "High", "Low", "Close", "Volume"), provider= "yahoo", compression="d", retclass="zoo")` – Allan Cameron Feb 03 '20 at 10:35
  • Already installed tseries. Nothing works – user10769166 Feb 04 '20 at 05:23

1 Answers1

0

Generally when you have a problem when calling function, you could have 2 different functions with different names of 2 different packages. So for example for get.hist.quote() you can call it in this way:

package1::get.hist.quote()
package2::get.hist.quote()
Will
  • 1,619
  • 5
  • 23