billdenney / pknca

An R package is designed to perform all noncompartmental analysis (NCA) calculations for pharmacokinetic (PK) data.
http://billdenney.github.io/pknca/
GNU Affero General Public License v3.0
67 stars 24 forks source link

Error: object ‘palette.colors’ is not exported by 'namespace:grDevices' #225

Closed jflyingeagle closed 1 year ago

jflyingeagle commented 1 year ago

Whether using a terminal or RStudio, I get the error below. I'm using Linux kernel 5.4.0. R version is 3.6.3 (2020-02-29) Rstudio version is 2023.06.1 build 524 Any suggestions? I can't figure out if this is an issue with the PKNCA package, R, or something else.

install.packages("PKNCA")

downloaded 1013 KB

billdenney commented 1 year ago

This does not occur on my system, and I don't think that PKNCA uses that function directly. My guess is that upgrading R will fix it. (R version 3.6.3 is 3 years old.)

jflyingeagle commented 1 year ago

Thanks for your help. It looks like the sources list may be pointing to an old or the wrong repository, so I'll try to fix that or just compile it. That should fix it.

billdenney commented 1 year ago

The grDevices package is built into R, so I don't know if something other than updating R will fix it.

The pallette.colors() function is not called directly by PKNCA, so maybe installing the package without the vignettes may work (I don't know a way to do that).

jflyingeagle commented 1 year ago

After updating the repository sources, I successfully installed R 4.3.1. Adding PKNCA returned no errors. I will give it a go. Thanks again!

billdenney commented 1 year ago

I'm glad that it worked!

For future support, I believe that you're referring to the debian/ubuntu apt repository, and you had to change so that you're installing the current version of R.

jflyingeagle commented 1 year ago

Yes, that's correct. First, I removed the currently installed r-base. I'm using Mint 20.3, so I checked which ubuntu release: $ cat /etc/upstream-release/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=20.04 DISTRIB_CODENAME=focal DISTRIB_DESCRIPTION="Ubuntu Focal Fossa"

Then verified that the repository in additional-repositories.list is correct, according to the install instructions (https://ftp.osuosl.org/pub/cran/): deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/

Then the usual apt update, checking that the R version is current with apt show r-base, and apt upgrade and/or install, as necessary.

Hope this helps if it's ever needed in the future.