"webr" paclage for PieDonuts

hello,

Im trying to install and load a package called "webr". It allows me to create "Piedonuts" - a donut chart with a piechart in the middle.

unfortunately, when I try loading the package, this is the error I get

library(webr)
Error: package or namespace load failed for ‘webr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘Rcpp’ 1.0.6 is already loaded, but >= 1.0.7 is required

I've updated my version of RStudio. What exactly does this error message mean, how can I rectify it?

Thanks

It means that you need to update the Rcpppackage, try with this command

 install.packages("Rcpp")

Do you get any error message?

RStudio is an IDE for the R programming language but it has no influence on your R package library.

I tried doing as you suggested, but I get this error message

"Package ‘Rcpp’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘Rcpp’
Warning in install.packages :
problem copying C:\Users\saura\OneDrive\Documents\R\win-library\4.1\00LOCK\Rcpp\libs\x64\Rcpp.dll to C:\Users\saura\OneDrive\Documents\R\win-library\4.1\Rcpp\libs\x64\Rcpp.dll: Permission denied
Warning in install.packages :
restored ‘Rcpp’"

I had pressed ctrl+Shift +F10 prior to entering
install.packages("Rcpp")

R has problems with cloud synced folders (OneDrive in your case), I recommend you to set your package library in a non synced folder.

You can change the default library folder by setting your R_LIBS_SITE environmental variable in a .Reviron or .Rprofile file. For example:

# In a .Renviron file you can set it by adding a line like this one with the desired location 
R_LIBS_SITE="C:\\Program Files\\R\\R-4.1.2\\library"

For a more detailed explanation, you can read this blog post

SO I enter the following code in Rstudio console (presume this is the way to do it!?)

R_LIBS_SITE="C:\\Program Files\\R\\R-4.1.2\\library

and also tried .libPaths(c("C:/Program Files/R/R-4.1.2/library"))

I still end up getting this error message

.libPaths(c("C:/Program Files/R/R-4.1.2/library"))

install.packages("Webr"")

install.packages("webr")
Error in install.packages : Updating loaded packages
install.packages("webr")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

"RTools: Toolchains for building R and R packages from source on Windows
Warning in install.packages :
'lib = "C:/Program Files/R/R-4.1.2/library"' is not writable
Error in install.packages : unable to install packages"

If you want to set your default package library as the R-version level package library you need to execute R as "administrator" to be able to install into that folder.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.