Source script s or specific script lines
I have several R scripts for different models and I need to make it available to other people. So I would like to have a single script that contains only sources to run other scripts, without having to search through many files to find the correct one. some of the scripts have more than one model, so if possible I would like to list only those generated from those scripts.
For example, to find ARIMA precision in different ways, I have to run the following different scripts in turn:
- Reading data
- Arima
- Inline Sample Accuracy
- Precision Out Reading Data
- Forced parameter accuracy
- Sample accuracy
The number of different scenarios increases the risk of error. especially since within 3 of these scenarios there are 5 other models that if I work myself I would highlight the specific model I want to use and run, but for other people that might be more confusing.
I know what I need to use source()
to get the scripts to run, but am not caught on how to fix only certain parts of the script and the correct source path
source to share
Instead of trying to fix parts of the scripts, move those bits of code into functions and then just call the functions you want.
Start by searching for write R functions
You can put all your functions in one file, fix it, and then make your function recipes with orders for others.
source to share