SQL 2016 with R - Error HRESULT 0x80004004

别说谁变了你拦得住时间么 提交于 2019-12-06 01:18:54

You will need to install the ggplot2 package to the SQL Server instance. There are various ways to install unavailable R packages to the SQL Server instance.

You will choose the method suitable for you depending on your setup.

If you are working on a local machine then you would want to download the Windows Binaries (zip file) of the package and install using T-SQL.

Check here: Install additional R packages on SQL Server

SQL Server runs your R script using a separate account with lowered privileges, for security reasons. In particular, this is not the same as your own user account. So if you installed your packages under your user directory, the script won't be able to find them.

A fix is to install the packages in a separate, globally readable directory (say c:\Rlib). After doing that, point your script to that location by adding .libPaths("c:\\Rlib") before the library() call.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!