Search code examples
rpie-chartinstall.packagesdonut-chart

Installing package webr failed


I am having issues installing the 'webr' package in R, which is necessary to use the PieDonut function to make beautiful multi-level pie charts.

I have followed the instructions on this website, which demonstrates how to install the packages and work with it. https://rpubs.com/cardiomoon/398623

However, when installing the package 'webr' it says:

Failed to install 'webr' from GitHub:
  (converted from warning) package ‘mnormt’ is not available (for R version 3.6.2)

It is necessary to install it from GitHub because the CRAN version does not include the PieDonut function.

I already tried to search for older versions of the package and made sure that my R version was up to date, however this did not result in any progress.

Does anybody have any suggestions to help me use this package?


Solution

  • You are on R 3.6.2, whereas mnormt requires R 4.0.0 or higher.

    Installing an older version of the package can go from easy to "I want to jump out the window" difficult. If you go to the package archive you can find a version that will not depend on newer version of R than you have. You can install it from source with, if I remember correctly, something along the lines of

    install.packages("https://cran.r-project.org/src/contrib/Archive/mnormt/mnormt_1.5-7.tar.gz", 
                     repos = NULL, 
                     type = "source")
    

    Assuming all its dependencies do not require something you do not have (i.e. R >= 4.0.0), it should work. If not, you would have to install mnormt dependecies by hand as well, as well as any potential dependencies of dependencies. See what I mean by jumping out of the window?

    Alternatively, upgrade your R and you avoid these kinds of problems (in 99.9 % of the time).