我的 Python 块(网状)无法识别 R 变量

发布于 2025-01-14 19:17:47 字数 344 浏览 3 评论 0原文

我的问题很天真,但我想不出为什么会出现这个错误。 我正在使用 reticulate 库在 R 中使用 python 脚本来完成项目。出于非常实际的原因,我想用 python 编写最后一个块。但是当我尝试调用之前定义的 R 变量(使用 r.var)时,Python 似乎无法识别 r 变量。

这里有一个非常基本的变量示例:

在此处输入图像描述

有人对此有答案吗?

提前致谢

My question is pretty naive, but I cannot think of why I am getting this error.
I am using the reticulate library to use a python script within R for a project. For a very practical reason, I want to code one last chunk in python. But when i try to call an R variable that was defined previously (using r.var), it seems like python does not recognize the r variable.

Example with a very basic variable here:

enter image description here

Does anyone has an answer to this ?

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文