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

Whatever code I try I get this error:

error: could not find function "dir.exists"

enter image description here

Sample code:

enter image description here

As I don't use dir.exists, it seems somehow R can't even be started, however it seems it's set up properly:

enter image description here

RStudio is installed on my pc and it's running properly


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.

Upvotes: 1

Views: 250

Answers (1)

Aurèle
Aurèle

Reputation: 12819

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

New function dir.exists() in package base to test efficiently whether one or more paths exist and are directories.

Consider upgrading to a more recent version of 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

Current R runtime: Microsoft R 3.4.4

R from CRAN can be found at 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/
(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)

Upvotes: 4

Related Questions