I tried running getSymbols()
from the famous library quantmod
in R, but it didn't work. So I want to ask how to solve this problem.
The codes that I tried was the following :
library(quantmod)
getSymbols("AAPL")
Error in download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, :
cannot open URL 'http://ichart.finance.yahoo.com/table.csv?s=AAPL&a=0&b=01&c=2007&d=4&e=30&f=2019&g=d&q=q&y=0&z=AAPL&x=.csv'
In addition: Warning message:
In download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, :
InternetOpenUrl failed: '서버 이름이나 주소를 확인할 수 없습니다.'
getSymbols("AAPL", src="google")
Error in download.file(paste(google.URL, "q=", Symbols.name, "&startdate=", :
cannot open URL 'http://finance.google.com/finance/historical?q=AAPL&startdate=Jan+01,+2007&enddate=May+30,+2019&output=csv'
In addition: Warning message:
In download.file(paste(google.URL, "q=", Symbols.name, "&startdate=", :
cannot open URL 'http://finance.google.com/finance/historical?q=AAPL&startdate=Jan+01,+2007&enddate=May+30,+2019&output=csv': HTTP status was '403 Forbidden'
I have ever run this function on the same desktop(OS : Windows 8.1K, x64).
Thank you for telling me about the right lastest version, so I tried upgrading the package like the below, but to fail.
install.packages("quantmod")
It answered that it still calls v0.4-7.
Installing package into ‘C:/Users/fya/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://mran.revolutionanalytics.com/snapshot/2016-11-01/bin/windows/contrib/3.3/quantmod_0.4-7.zip'
Content type 'application/zip' length 472947 bytes (461 KB)
downloaded 461 KB
package ‘quantmod’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\***\AppData\Local\Temp\RtmpozsYvx\downloaded_packages
Is there more effective way for solving this problem?
I referred to another stackoverflow page about upgrading packages in R :
https://stackoverflow.com/questions/21461649/how-to-update-a-package-in-r