How to save and load environment objects in R
There was a need for me to build a prediction model in R and a Shiny app to allow users to get predictions out of my model. As the building of a prediction model take quite a while, it is not feasible for my shiny app to build the prediction model on demand.
There must be a way for my Shiny app to load my prediction model only once for fulfilling prediction requests from the users. As with many other programming languages, there are mechanisms in R that allow me to save my environment objects in one session and load them back in another session. This post documents how I can save and load environment objects in R.
Follow us