Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Not able to install R library in PowerBI

Hi, 

 

I am trying to install R library in PowerBI R editor

 

If i write: 

install.packages('mice', lib=.libPaths())
I get error message that
the lib element  C:\Program Files\R\R-3.6.2\library is not a writable directory
 
If i write
install.packages('mice')
I get
 
Error Message:
R script error.
Installing package into 'C:/Users/my name/Library'
(as 'lib' is unspecified)
Error in contrib.url(repos, "source") :
trying to use CRAN without setting a mirror
Calls: install.packages -> contrib.url
Execution halted
 
If i write
install.packages("plotrix", lib = "C:/Program Files/R/R-3.6.3/library")
I get the same error message as above.
What should I do???
 
Thanks in advance!

11 Replies

  • ImkeF's avatar
    ImkeF
    Icon for Community Champion rankCommunity Champion

    Why do you want to install it via Power BI?

    Power BI performs actions that are repeatable (i.e.regular data refreshes) but you'd normally install a package just once.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Is it possible to use library out of Powerbi and still use it in Powerbi? How to do that? When I install library in R studio, it is saved in a temp folder as I can see... and not possible to use it in powerbi...

      • ImkeF's avatar
        ImkeF
        Icon for Community Champion rankCommunity Champion

        Change the installation path in R Studio to the path that you've entered in your PBI settings: