Seth,
the recipe of John (kudos to him for posting it) was possible because I actually took care of incorporating the workaround from my previous recipe into the system for 13.0.1. But since this apparently did not work for you and I could not re-test things properly at that moment, I just admitted about the generally less than stellar situation with external R connectivity, particularly the documentation is behind. Perhaps I should've suggested you to try this simplified procedure.
I agree with you that we should try make things more automated. We've run some experiments to automate the JRI library building step at run-time, hopefully the setup will be simplified in the future.
Regarding package installation, we may add a dedicated RPackageInstall
(or similarly named) function in 13.2. There are technical reasons why package installation from within RLink with REvaluate
fails. Basically, R interactively prompts to pick a mirror, but RLink has not been built with the ability to process such inverse interactive prompts / requests from R.
In the mean time, one could use something like this:
Options[installRPackage] = { "MirrorURL" -> "http://cran.us.r-project.org" }
installRPackage[name_String, OptionsPattern[]] := REvaluate[
"install.packages('"<> name <>"', repos='" <> OptionValue["MirrorURL"] <> "')"
]
which normally should work.