Automation in R

Hello Everyone,

I am new to R and I am fetching certain reports on daily basis. Now I want to automate the fetching of reports in R. Is that possible in R?. I fetch report using an internal application. I want to know that which functions can be used to automate the process of fetching reports and which function can be used to give link or path in R.

Hello! We need a bit more information to help you with this. How do you fetch the report and from where? If it is from a webpage or a directory on your companies network? If so you can use either download.file() or file.copy() (look at the documentation of the functions to see how to use them).

If you want to run the script automatically (say, every day at midnight) you cannot do that directly in R, but if you are on linux you can use (for example) cron.

Thank you for your prompt response.I fetch report from an internal application which is used by me. Before downloading the file I need to enter the credentials of the java based application and after that only I can fetch the reports. Hence the functions suggested is not working because application is installed in my system.

Also to add on the above I am using the windows system.
Kindly let me know if more information is required.

That sounds as if it would be not-so-easy. It depends on what the java application actually does and how it handles authentication, you will probably have to work together with the person who developed the java application :(.

Thank you for your response. I hope I could do that.

If the java program has a command line interface, it would be quite easy. If it's a GUI and the developer did not plan on it being accessible in an automated way, your chances are slim.

1 Like

Hi, Can I get to know the function to apply if I want to download a file from any website?. Will download.file function work?.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.