cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Patron
Post Patron

R Visual Rcpp package error

Hi, all

I was using several custom visuals using R using R 3.4.2 however after upgrading to latest R 3.5.1 I find both custom  R visuals and basic Object visuals using R start failing (even after upgrading packages to R 3.5.1 compatibility)

 

 

1st Error on R Visual

 

R Code

library(ggplot2)
t<-ggplot(dataset, aes(ID, Promedio)) + geom_point(aes(color=factor(Year))) + facet_wrap(~Year)
#Cambiando los colores
t + scale_color_manual(values=c("red","black","green"))

 

 

Error trace 1

 

Error Message: Error in R script .
Error: package or namespace load failed for 'ggplot2':
 package 'Rcpp' was installed by an R version with different internals; it needs to be reinstalled for use with this R version
Ejecución interrumpida

 

 

Most annoying part is that previous code works in RStudio!! I have Powerbi--Z Options-->R pointing to my R version 3.5.1

 

 

 

 

 

RCPP1.PNG

 

 

 

 

Same code in R Studio works OK, without errors

RCPP2.PNGsRCPP3.PNG

 

ñ

RCPP.PNG

 

 

g

2º nd Error on Forecasting ARIMA R Visual

Error Trace

 

Error Message:
Error del script R.
Loading required package: XML
Loading required package: htmlwidgets
Error: package or namespace load failed for 'htmlwidgets':
 package 'Rcpp' was installed by an R version with different internals; it needs to be reinstalled for use with this R version
Warning message:
In libraryRequireInstall("htmlwidgets") :
  *** The package: 'htmlwidgets' was not installed ***
Loading required package: scales
Error: package or namespace load failed for 'scales':
 package 'Rcpp' was installed by an R version with different internals; it needs to be reinstalled for use with this R version
Warning message:
In libraryRequireInstall("scales") :
  *** The package: 'scales' was not installed ***
Loading required package: forecast
Error: package or namespace load failed for 'forecast':
 package 'Rcpp' was installed by an R version with different internals; it needs to be reinstalled for use with this R version

2 ACCEPTED SOLUTIONS

I had yesterday the same problem. Only reinstalling (or even go back to older versions) did not help.

Only after I deleted the libraries in "<user>/documents/R" and in "<user>/library"  and reinstalled R and installed the packages I needed, the problem was solved.

 

I think mixed package versions in <user>/library did give the problem for me. I did not know that packages were also in that directory. Only uninstall R en delete "<user>/documents/R" was not enough.

The newest version of PowerBi and R (3.5.1) are now working for me.

View solution in original post

my problem....old versions installed here "<user>/library"  ...and newer ones  "<user>/documents/R". Deleting  "<user>/library" work!! **bleep**ing libraries...only 6 where the problem...I updated libraries several times... "<user>/documents/R"

View solution in original post

10 REPLIES 10

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors