Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing when using R 4.3.0, in Ubuntu Linux 22.04.2 #83

Open
jmcastagnetto opened this issue Apr 28, 2023 · 0 comments
Open

Error installing when using R 4.3.0, in Ubuntu Linux 22.04.2 #83

jmcastagnetto opened this issue Apr 28, 2023 · 0 comments

Comments

@jmcastagnetto
Copy link

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.

state_tbl <- setNames(toupper(state.abb), tolower(state.name))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant