You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the learning objective of this lesson is not how to run R scripts non-interactively, we can convert the R script into a general executable that "hides" what it is under-the-hood.
Add this at top of the analysis_scripts/pi_estimator.R (note: we hardcode the path to the system-installed Rscript as we don't want conda environments, etc., messing this up):
#!/usr/bin/Rscript
Make it executable: chmod +x analysis_scripts/pi_estimator.R
Rename: mv pi_estimator.R pi_estimator
Adjust scripts and materials to use analysis_scripts/pi_estimator instead of Rscript analysis_scripts/pi_estimator.R