I’m an experienced R programmer trying to learn a little about SQL. One of my good friends who lives totally in the database world (I call her the Teradata Queen) shared a link to a blog post at SQLServerCentral about using R. Microsoft is including R in its SQL Server distribution, so this is an opportunity for a lot of interesting work combining the data manipulation power of SQL Server with the data analysis power of R. Anyway, the blog post explains some of the cost and performance issues associated with R scripts running on a SQL Server CPU.
Steve Jones. Where Do You Run Your R Scripts? SQL Server Central Blog. 2016-10-20. Available in html format.