R.NET.Community(= 1.5.16) R.NET.Community.FSharp(= 0.1.9)请注意,还有(令人困惑的)较旧的 R.NET 包(没有(社区"位),并且在packages中包含该位可能会混淆R提供程序.顺便说一句:您也可以尝试使用 FsLab模板,它可以完成&加载所有内容更加简单-将所有内容简化为一个#load:-)I am using the R Type Provider like so in the REPL#r "../packages/FSharp.Data.2.2.0/lib/net40/FSharp.Data.dll"open FSharp.Data[<Literal>]let uri = "https://reddoggabtest-secondary.table.core.windows.net/TestTelemetryData0?tn=TestTelemetryData0&sv=2014-02-14&si=GabLab&sig=GGc%2BHEa9wJYDoOGNE3BhaAeduVOA4MH8Pgss5kWEIW4%3D"type CarTelemetry = XmlProvider<uri>let carTelemetry = CarTelemetry.Load(uri)#r "C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/.NETFramework/v4.5.1/System.Xml.Linq.dll"open System.Xml.LinqcarTelemetry.Entries |> Seq.iter(fun e -> printfn "%A" e.Title)#I "../packages/RProvider.1.1.8/lib"#r "../packages/R.NET.1.5.5/lib/net40/RDotNet.dll"#r "../packages/R.NET.1.5.5/lib/net40/RDotNet.NativeLibrary.dll"#r "../packages/R.NET.Community.FSharp.0.1.9/lib/net40/RDotNet.FSharp.dll"#r "../packages/RProvider.1.1.8/lib/net40/RProvider.dll"#r "../packages/RProvider.1.1.8/lib/net40/RProvider.Runtime.dll"open Systemopen System.Netopen RDotNetopen RProvideropen RProvider.graphicsopen RProvider.statscarTelemetry.Entries |> Seq.map(fun e -> e.Content.Properties.Acceleration.Value) |> R.log |> R.diffWhen I execute it, I am getting this exceptionSystem.MissingMethodException: Method not found: 'RDotNet.REngine RDotNet.REngine.GetInstance(System.String, Boolean, RDotNet.StartupParameter, RDotNet.Devices.ICharacterDevice)'. at RProvider.Internal.RInit.engine@114.Invoke() at System.Lazy`1.CreateValue()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Lazy`1.get_Value() at RProvider.RInteropInternal.toR(Object value) in c:\Tomas\Public\FSharp.RProvider\src\RProvider\RInterop.fs:line 287 at RProvider.RInterop.passArg@447(List`1 tempSymbols, Object arg) in c:\Tomas\Public\FSharp.RProvider\src\RProvider\RInterop.fs:line 461 at RProvider.RInterop.argList@468-1.GenerateNext(IEnumerable`1& next) in c:\Tomas\Public\FSharp.RProvider\src\RProvider\RInterop.fs:line 475 at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.MoveNextImpl() at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.System-Collections-IEnumerator-MoveNext() at Microsoft.FSharp.Collections.SeqModule.ToArray[T](IEnumerable`1 source) at RProvider.RInterop.callFunc(String packageName, String funcName, IEnumerable`1 argsByName, Object[] varArgs) in c:\Tomas\Public\FSharp.RProvider\src\RProvider\RInterop.fs:line 466 at <StartupCode$FSI_0012>.$FSI_0012.main@()Stopped due to errorAny ideas? Thanks. 解决方案 This looks like some version mismatch - what version(s) of R.NET do you have installed in the packages folder?The correct ones (as required by the latest R provider NuGet package) are:R.NET.Community (= 1.5.16) R.NET.Community.FSharp (= 0.1.9) Note that there is (confusingly) also older R.NET package (without the "Community" bit) and having that in packages can probably confuse the R provider.BTW: You can also try using the FsLab templates instead, which makes the process of installing & loading everything a lot simpler - reduces all to just a single #load :-) 这篇关于F#R提供程序:找不到方法:'RDotNet.REngine RDotNet.REngine.GetInstance的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
11-01 02:11