I have a script in R that is frequently called during the day (by other scripts). I call R in a terminal using

Rscript code.R argument1 argument2

I notice it takes a lot of time to load packages and model and set up R.

Loading the model.rds in R is slow. This will affect the performance of my APIs. Ideally, I want to load the model once and then cache it inside the R environment.

Would it be possible to load up trained models (.rds)? How?

Thanks in Advance.

More Anuj Dakwala's questions See All
Similar questions and discussions