ggstatsplot package installation problem -RStudio

Hi there!

I receive an error message when I load the library of ggstatsplot, and it is not functioning.

> library(ggstatsplot)
Registered S3 method overwritten by 'broom.mixed':
  method      from 
  tidy.gamlss broom
Error: package or namespace load failed for ‘ggstatsplot’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘statmod’

Both R and RStudio are up-to-date. I also deleted the downloaded binary packages and installed it again. I installed all dependencies as well, but still the problem is not solved.

Only problem that I could see is the error occurring when I install ggplot2. When I try to install the packages, the pop-up window leads me to restart R because the packages that will be updated are currently loaded. When I click "yes" to restart, I get this result:

> install.packages("ggplot2")
Error in install.packages : Updating loaded packages
Restarting R session...

Then the same window pops up again, then ask if I want to restart R again and again. When I click "no", another pop-up window asks if I want to send the crash report. Once this window is closed, it installs the package.

> install.packages("ggplot2")
Error in install.packages : Updating loaded packages
> install.packages("ggplot2")
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/ggplot2_3.3.2.tgz'
Content type 'application/x-gzip' length 4064530 bytes (3.9 MB)
==================================================
downloaded 3.9 MB


The downloaded binary packages are in
	/var/folders/sv/my66x15x7l7cxjw_vsy1m5140000gn/T//RtmpjbleE8/downloaded_packages

Even though there comes no error message anymore, something seems to be wrong with ggplot2 installtion which could be causing the problem with ggstasplot. Could anyone here help me solve this problem?

Any advice is appreciated. Thank you very much!

You are missing a package dependency, try installing it.

install.packages("statmod")

Thank you very much. It solved the problem!

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.