taking a stab at R for some statistics problems
including problems from Finite Mathematics and Calculus with Applications by Lial, Greenwell and Ritchey
for a Mac M1 you may need to run R interactively (or call it using full path programatically) like
/Library/Frameworks/R.framework/Resources/bin/R