D帧到R [英] Deedle frame to R

查看:140
本文介绍了D帧到R的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使一些代码工作。
我正在使用 rinterop 作为参考。



我有一个框架< DateTime,string> ,我尝试使用


$ b $发送给R b

  let frame = 
let aSerie =
Series.ofObservations
[ DateTime(2013,1,1)=> 10.0
DateTime(2013,1,4)=> 20.0
DateTime(2013,1,8)=> 30.0]
框架([Hello],[aSerie])
R.as_data_frame(frame)

其中给出以下内容:


System.Exception:没有转换器注册类型
Deedle.Series `2 [[System.DateTime,mscorlib,Version = 4.0.0.0,
Culture = neutral,PublicKeyToken = b77a5c561934e089],


我还尝试了以下示例:

  let rnd = Random()
让ts =
[for i in 0.0 .. 100.0 - >
DateTime.Today.AddHours(i),rnd.NextDouble()]
|>系列
R.as_zoo(ts)

导致相同类型的错误: / p>


System.Exception:没有转换器注册类型
Deedle.Series`2 [[System.DateTime,mscorlib,Version = 4.0 .0.0,
Culture = neutral,PublicKeyToken = b77a5c561934e089],[System.Double,
mscorlib,Version = 4.0.0.0,Culture = neutral,
PublicKeyToken = b77a5c561934e089]]或其任何基本类型


我的最终目标是绘制Deedle框架,使用 DateTime 使用R的行键。

解决方案

我认为FsLab中的安装脚本有一个错误 - 你能检查一下文件 Deedle.dll Deedle.RProvider.Plugin.dll (隐藏在 packages 文件夹)被复制到 RProvider.dll 生活的目录(即 packages\RProvider.1.0.5\ lib )。



如果不,复制文件是否解决问题? (假设文件不存在,并将它们复制到目录中可以解决问题,这看起来像是FsLab的安装脚本中的错误。)


I am trying to put some code to work. I am using rinterop as a reference.

I have a Frame<DateTime,string> which I try to send over to R using

let frame = 
    let aSerie = 
        Series.ofObservations 
            [ DateTime(2013,1,1) => 10.0
              DateTime(2013,1,4) => 20.0
              DateTime(2013,1,8) => 30.0 ] 
    Frame(["Hello"], [aSerie])
R.as_data_frame(frame)

which gives the following:

System.Exception: No converter registered for type Deedle.Series`2[[System.DateTime, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],

I also tried the following example:

let rnd = Random()
let ts = 
  [ for i in 0.0 .. 100.0 -> 
      DateTime.Today.AddHours(i), rnd.NextDouble() ] 
  |> series
R.as_zoo(ts)

which result in the same kind of error:

System.Exception: No converter registered for type Deedle.Series`2[[System.DateTime, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] or any of its base types

My ultimate goal is to chart Deedle frames, with DateTime as row keys using R.

解决方案

I think there is a bug in the installation script in FsLab - can you please check that the files Deedle.dll and Deedle.RProvider.Plugin.dll (hidden somewhere in the packages folder) were copied to the directory where RProvider.dll lives (that is packages\RProvider.1.0.5\lib).

If no, does copying the files there resolve the issue? (Assuming the files are not there and copying them to the directory solves the problem, this looks like a bug in our installation script for FsLab.)

这篇关于D帧到R的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆