I am trying to build up a dataframe with financial data from an API. R should pull a new record every minute from that API and append it to the existing dataframe.
U created a dataframe from that API with one record named "XRP_TimeSeries". Then I wrote the script which should be executed every minute to append a new record to the dataframe:
XRP_TimeSeries <- rbind(XRP_TimeSeries,
fromJSON("https://api.coingecko.com/api/v3/coins/markets?vs_currency=eur&ids=ripple"))
By executing the code manually, it works. Executing it e.g. 10 times I have 10 records in the desired dataframe.
Then I set the TaskscheduleR Addin to run this script every minute. The scheduler starts the script, a Windows Command Prompt pops up and closes again, but nothing else happens.
On the log-file I see an error:
object XRP_TimeSeries not found
Can someone help me get this thing running?
The system I use is to call R by using batch files and use Windows task scheduler to schedule to execute the script for me. "C:\R-3.6.2\bin\R.exe" where you had located your R.exe file.