简体   繁体   中英

F#: RProvider fails to load stats.dll for ggplot2

I am getting an error when trying to use RProvider for F# in Visual Studio 2017.

I discovered the problem while trying to load the package ggplot2:

module ggplot2Program

open System
open RProvider
open RProvider.ggplot2

When I attempt this and then try to use the ggplot2 library under RProvider.ggplot2.R

I simply obtain this error message in the log file for RProvider:

[06/02/2018 22:05:16] [Pid:13556, Tid:5, Apid:1] Adding work item to queue

[06/02/2018 22:05:16] [Pid:13556, Tid:1, Apid:1] server event loop: got work item

[06/02/2018 22:05:16] [Pid:13556, Tid:1, Apid:1] eval(require(ggplot2))

[06/02/2018 22:05:16] [Pid:13556, Tid:1, Apid:1] Output: Loading required > package: ggplot2

Error: package or namespace load failed for 'ggplot2' in inDL(x, > as.logical(local), as.logical(now), ...):

unable to load shared object 'C:/Program Files/R/R-3.4.3/library/stats/libs/x64/stats.dll':

LoadLibrary failure: The specified module could not be found.

I have tried reinstalling R and swapping the stats.dll in the C:/Program Files/R/R-3.4.3/library/stats/libs/x64/ and C:\\Program Files\\R\\R-3.4.3\\library\\stats\\libs\\i386 directories but this simply results in a "not a valid Win32 application" error in the log.

What could be the problem? Is RProvider detecting Visual Studio as a x64 process or is it something else?

The problem could be due to the presence of etc\\Renvirons.site file in the v3.4.3 release of R.

I had a similar issue and deleting the etc\\Renviron.site file and restarting VS 2013 resolved it.

See the following github issue: https://github.com/jmp75/rdotnet/issues/62

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM