1

I have developed a complex model in R and I need for users of this model to run it through excel without having R installed in their local machine. Elsewhere, I would build a self-contained executable a la dll or .exe

However, I do not see how I can do this with R, particularly as I am using a lot of libraries/packages that are not part of R base.

What I need is for users to launch excel, make a selection and pass this information into R. R would then run the model and export the output back to excel.

The R inputs are 3:
         1) Company Names       (list of excel cells)
         2) Period              (list of cells)
         3) Method 0,1,2,3,all  (drop-down)



The R outputs are 3:
         1) Dataset (dataframe or similar)
         2) Set of graphs (at least 4)
         3) Classification table

The outputs will then be passed into excel which acts as the GUI. Ideally, I would like users to be able to interact with the charts or change a value in the inputs section in excel and update the R-sourced chart.

I have looked into Rexcel and BERT but I don't think they can accommodate what I am after.

Thank you

Community
  • 1
  • 1
J. Doe.
  • 1,255
  • 1
  • 12
  • 25
  • Have you considered [OpenCPU](https://www.opencpu.org/)? – r2evans May 26 '16 at 13:43
  • Thank you for the response. If I understand correctly, you imply moving away from excel and have an R GUI based on openCPU? – J. Doe. May 26 '16 at 13:51
  • There has been some dev on a REST-ful API from Excel to OpenCPU, but I don't remember where at the moment. But yes, trying to access the complexity of an R-based model in Excel is problematic. – r2evans May 26 '16 at 13:52
  • [Shiny](http://shiny.rstudio.com/) also allows you to create a webapp that exposes your analyses to other people. In addition, [Microsoft PowerBI](https://powerbi.microsoft.com/en-us/) allows you to embed R scripts in a dashboard. – Paul Hiemstra May 26 '16 at 14:06
  • So, based on what you guys know there is no way to get this to work if users don't have an R installation on their pc. Is this correct? – J. Doe. May 26 '16 at 15:11
  • 1
    Not exactly a standalone .exe file, but you can create a standalone folder that contains everything needed to run the R script without requiring users to 'install' R, by using R-portable. From the end-user perspective, this should be just as good as a single .exe file, because all they have to do is copy a folder to their computer, rather than copy a single file. See http://stackoverflow.com/questions/14096520/compile-r-script-into-standalone-exe-file – dww May 26 '16 at 15:52
  • 1
    In the link that @dww provided, the answerer (@Konrad) provided a link to a blog entry titled [**"Deploying Desktop Apps with R"**](http://oddhypothesis.blogspot.com/2014/04/deploying-self-contained-r-apps-to.html), a 2014 post that was updated in 2015. The blog itself was further updated as [**"Desktop DeployR"**](http://oddhypothesis.blogspot.com/2016/04/desktop-deployr.html), and both articles together do a good job of walking you through the requirements, prep, packaging, etc. I've been trying to provide R-based services to Excel users, this is the best alternative I've found. – r2evans May 27 '16 at 02:40
  • @dww I believe this could work. If a dll for excel or an .exe is impossible to build then I could "deploy" the model to the users' workstations and contain it in a folder structure of some sort. None of the users will have admin rights to install non-approved programs (including R) but if R - portable can utilize libraries and does not require installation then it should be fine. Are there any other alternatives? Thank you so much for helping out on this one. – J. Doe. May 27 '16 at 09:41

0 Answers0