cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hiimhp Frequent Visitor
Frequent Visitor

Connecting to R dataset - unable to connect

Hi! I am getting an error when I try to follow the steps in the doc here https://docs.microsoft.com/en-us/power-bi/desktop-r-scripts

Essentially I would just like to try to run an R script to connect to data. I have installed R in my local machine and I am not entirely sure what I am missing here. Help you be much appreciated!

 

The error I am getting is:

Details: "Exception of type 'Microsoft.Analytics.Modules.R.ErrorHandling.RException.Primitives.NotValidRDataException' was thrown."

11 REPLIES 11
elenton Regular Visitor
Regular Visitor

Re: Connecting to R dataset - unable to connect

I am getting the same error whie trying to follow the below example, i can run the commands in RStudio but can not pull into power bi

https://www.red-gate.com/simple-talk/sql/bi/power-bi-introduction-working-with-r-scripts-in-power-bi...

Anonymous
Not applicable

Re: Connecting to R dataset - unable to connect

Hi,

 

I have the same error here when using below script

 

= R.Execute("# 'dataset' holds the input data for this script#(lf)write.csv(dataset,""C:/Users/Documents/test2.csv"")",[dataset=#"Renamed Columns"])

Super User III
Super User III

Re: Connecting to R dataset - unable to connect

Same here.

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark my post as a solution. Thanks!

Imke Feldmann

How to integrate M-code into your solution -- Check out more PBI- learning resources here -- Performance Tipps for M-queries




mskim Visitor
Visitor

Re: Connecting to R dataset - unable to connect

It seems to be R-3.6.0 cause this error.

I install R-3.5.3 side by side and configure it to R home directory in PBI Desktop.

Then error message dissapears.

 

 

 

Super User III
Super User III

Re: Connecting to R dataset - unable to connect

Thanks, but this didn't resolve the error for me unfortunately.

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark my post as a solution. Thanks!

Imke Feldmann

How to integrate M-code into your solution -- Check out more PBI- learning resources here -- Performance Tipps for M-queries




elenton Regular Visitor
Regular Visitor

Re: Connecting to R dataset - unable to connect

id installing a lower version also and this didnt resolve it for me either, although i did leave the higher version installed, did that need uninstalling or shoudl i just have had to change the version in power bi (which i did)

Anonymous
Not applicable

Re: Connecting to R dataset - unable to connect

Same error here

Super User III
Super User III

Re: Connecting to R dataset - unable to connect

Don't think that this will resolve it. 

 

On 3.6.0 I get the exeption-error from above and if I go down to R Open I receive an empty table (while RStudio shows 2 tables of data).

 

So this is still buggy, unfortunately.

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark my post as a solution. Thanks!

Imke Feldmann

How to integrate M-code into your solution -- Check out more PBI- learning resources here -- Performance Tipps for M-queries




Highlighted
midlvlmgmt Visitor
Visitor

Re: Connecting to R dataset - unable to connect

I'm also running into this problem.  Installed earlier version of R (3.5.0), but this did not help.

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors