1

thanks for your time.

I have a more general question, related to a business use case.

I created an R script that takes an excel file, checks certain conditions, and then exports out another excel file.

I created this for a specific use case, and for other people in my organization on a certain team.

The other people in my organization would like to be able to run this R script on their own, without having to contact me every time they want to run it. They could be running it upwards of a few times a day across the entire team.

On my end, I do not want the team members to have to open up R each time they want to run the script. It doesn't seem very user friendly from their perspective, and I would prefer to keep the experience easy for them.

So here's my question: Is there any application I can find or create that the team members can use to run my R script, without having to use R explicitly?

I've done quite a bit of googling around. One solution I saw was to create an executable version of the file, but I believe that would still be tricky since that would involve customizing each of the team members computers.

I also thought that RShiny might be able to fill the gap? But I am not familiar with RShiny as of now, and do not know what exactly it can do.

Thanks for any other suggestions you may have.

Ethan Wicker
  • 526
  • 7
  • 14
  • 2
    Use the `Rscript` executable that runs at command line (cmd, Powershell, Bash, etc.): `Rscript /path/to/my/Rscript.R`. No R app launches or opens in background. – Parfait Oct 22 '18 at 20:51

1 Answers1

5

There are mainly two ways. with using Rscript, like below:

C:\Users\automat7> Rscript app.r

or in some cases, like with shiny or when running a one line script, usually, you can use

R -e "shiny::runApp(address_to_folder, args)"

You may need to add the R's bin folder to your PATH environment variable if you are using Windows. You can follow the instructions here for that: How to Add a folder to Path environment variable in Windows10

automa7
  • 494
  • 4
  • 15