Thomas, I am sorry to say that I fell at the first hurdle. This part
And there are some caveats: you have to install the needed R packages into your SQL Server R service first (use my installpkg script). But in order to accomplish that, you have to have write permissions to the library folder, in my case of a standard installation, that is "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\R_SERVICES\library". I'll leave it up to you to sort that out.
Did not work out for me. I got a permissions error, despite the fact that I am a local admin on the SQL machine I am working on.
If you aren't happy single, you won't be happy in a relationship.
Remember, happiness comes from guitars, not relationships.