get online data every hour in R

后端 未结 2 1871
执念已碎
执念已碎 2021-02-09 11:56

I would like to get the Observatory data every hour they update the forecast.

My one time data extract code is following.

library(RCurl)
web <- getURL         


        
2条回答
  •  逝去的感伤
    2021-02-09 12:25

    You probably could use Sys.sleep() but it smells like bad code.

    Instead, set up a cron job to run your code updating every hour. Then your script is simple, and more robust.

提交回复
热议问题