如何通过 rpy2 将特定数据集从 R 库“tsdl”加载到 python?

问题描述

我不是 R 用户,我只是想通过 R 获取一些数据。在 tsdl 库中有一个数据集 plsuper 可在“http://www.robjhyndman.com/TSDL/roberts/plsuper.dat ”。

我想弄清楚如何使用包 tsdl 在 R 中加载它,然后转移到 python?

我想我可以在 R 命令行上执行 tsdl[[599]] 来获取数据。

Time Series:
Start = 1900 
End = 1986 
Frequency = 1 
 [1] 28.55 27.37 25.60 ...
attr(,"source")
[1] Roberts (1992)
attr(,"description")
[1] Annual precipitation (inches),Lake Superior,1900 to 1986
attr(,"subject")
[1] Meteorology

如何使用 rpy2 将其导入 Python?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)