简体   繁体   English

Power BI 中 R 视觉对象的第一步

[英]first steps of R visual in Power BI

I'm just starting to use R visuals in Power BI, but I can't get it working我刚开始在 Power BI 中使用 R 视觉对象,但无法正常工作

Whatever code I try I get this error:无论我尝试什么代码,我都会收到此错误:

error: could not find function "dir.exists"错误:找不到 function“dir.exists”

在此处输入图像描述

Sample code:示例代码:

在此处输入图像描述

As I don't use dir.exists , it seems somehow R can't even be started, however it seems it's set up properly:由于我不使用dir.exists ,似乎 R 甚至无法启动,但它似乎设置正确:

在此处输入图像描述

RStudio is installed on my pc and it's running properly RStudio 安装在我的电脑上并且运行正常


I've just downloaded sample.pbix from Microsoft ( https://learn.microsoft.com/en-us/power-bi/visuals/service-r-visuals ) and it has the exact same error.我刚刚从 Microsoft ( https://learn.microsoft.com/en-us/power-bi/visuals/service-r-visuals ) 下载了 sample.pbix,它有完全相同的错误。

dir.exists was introduced in R 3.2 https://cran.r-project.org/bin/windows/base/old/3.2.0/NEWS.R-3.2.0.html dir.exists在 R 3.2 https: //cran.r-project.org/bin/windows/base/old/3.2.0/NEWS.R-3.2.0.html 中引入

New function dir.exists() in package base to test efficiently whether one or more paths exist and are directories. package 基础中的新 function dir.exists()可以有效地测试一个或多个路径是否存在并且是目录。

Consider upgrading to a more recent version of R.考虑升级到更新版本的 R。

I would recommend either current R from CRAN (4.0 at the time of this writing), or Microsoft R 3.4.4 to match the runtime in PowerBI Service https://learn.microsoft.com/en-us/power-bi/connect-data/service-r-packages-support我会推荐来自 CRAN 的当前 R(撰写本文时为 4.0)或 Microsoft R 3.4.4 以匹配 PowerBI Service https 中的运行时://learn.microsoft.com/en-us/power-bi/connect -数据/服务-r-包支持

Current R runtime: Microsoft R 3.4.4当前 R 运行时:Microsoft R 3.4.4

R from CRAN can be found at https://cran.r-project.org/ .来自 CRAN 的 R 可以在https://cran.r-project.org/找到。

Microsoft R 3.4.4 can be found at https://cran.microsoft.com/bin/windows/base/old/3.4.4/ Microsoft R 3.4.4 可以在https://cran.microsoft.com/bin/windows/base/old/3.4.4/找到
(edit 2021-02: now I'm in doubt, this seems to be R from CRAN as well. See https://mran.microsoft.com/release-history for previous versions of Microsoft R) (编辑 2021-02:现在我有疑问,这似乎也是来自 CRAN 的 R。有关以前版本的 Microsoft R,请参阅https://mran.microsoft.com/release-history

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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