ggalt icon indicating copy to clipboard operation
ggalt copied to clipboard

Error installing when using R 4.3.0, in Ubuntu Linux 22.04.2

Open jmcastagnetto opened this issue 1 year ago • 0 comments

Looks like the direct reference to state.name (and state.abb) is generating an error when byte compiling during installation:

> install.packages("ggalt")
Installing package into ‘/home/user/R/x86_64-pc-linux-gnu-library/4.3’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/ggalt_0.4.0.tar.gz'
Content type 'application/x-gzip' length 2155519 bytes (2.1 MB)
==================================================
downloaded 2.1 MB

* installing *source* package ‘ggalt’ ...
** package ‘ggalt’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in eval(exprs[i], envir) : object 'state.name' not found
Error: unable to load R code in package ‘ggalt’
Execution halted
ERROR: lazy loading failed for package ‘ggalt’
* removing ‘/home/user/R/x86_64-pc-linux-gnu-library/4.3/ggalt’

The downloaded source packages are in
	‘/tmp/RtmpttJdp4/downloaded_packages’
Warning message:
In install.packages("ggalt") :
  installation of package ‘ggalt’ had non-zero exit status

A change to datasets::state.name (and datasets::state.abb) in the line below fixes that. Tested mangling the code in the tar.gz downloaded.

https://github.com/hrbrmstr/ggalt/blob/e46e54bbf800ab6aff88f32097d1a42fd43c097e/R/stateface.r#L10

jmcastagnetto avatar Apr 28 '23 13:04 jmcastagnetto