Domanda

I want to run a R script again and again from commandline (passing different arguments). At the beginning of the script, I load a saved R workspace. However, the workspace is too large, so it will take a long time to load every time I run the script.

Is there anyway to just load the workspace once for all the run?

Thank you.

È stato utile?

Soluzione

Every time you run the script it creates a new R instance, so you will need to reload your environment every time the script runs.

If you want to keep your environment in memory, you might want to create a while loop which reads user input from console or from file and executes the function with new parameters.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top