Forum Discussion

Regiso's avatar
Regiso
Icon for Advocate V rankAdvocate V
6 years ago
Solved

Help! DataSource.Error: ADO.NET: R script error.

Hello, I am copying a video from Bielite Importing Stock Data into Power BI  I am using R 4.0.0 and RStudio 1.3.959. Rtools, httr, rvest, xml2, BatchGetSymbols are all successfully installed     ...
  • Regiso's avatar
    6 years ago

    The problem lies in the path that Power BI follows to get the packages.

    1. Go to your R IDE and find out where R goes by typing .libPaths().

    2. Then, go to Power BI > Transform > R Script and see where Power BI is going

    3. Make it a df <- as.data.frame(.libPaths())

    4. See if Power BI has the same list you do. 

    5. Add this one line to the top of your R script in Power BI  .libPaths(.libPaths()[i]) where i is the line with the address that matches your R IDE

     

    6. Voila!

     

    All credit for this solution goes to Stacia Varga at Plural Sight - read the blog here: Data Inspirations Solves the Power BI R path issue 

    @_StaciaV_