Error when downloading sjPlot package in R - r

I keep getting an error message when trying to download sjPlot (removed part of mu directory)
ERROR: lazy loading failed for package ‘sjPlot’
* removing ‘/Users/Library/R/4.0/library/sjPlot’
Warning in install.packages :
installation of package ‘sjPlot’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/t7/__d172j90w1gp2cdfnyz8j180000gn/T/RtmpcHqFgR/downloaded_packages’
This is what I did:
install.packages("sjPlot")

Related

Dependency error when install ggplot in R

When I try to install ggplot with this code
install.packages("png")
install.packages("RgoogleMaps")
install.packages("ggmap")
library(ggmap)
It returns error
installing to /usr/local/Cellar/r/4.2.2/lib/R/library/00LOCK-png/00new/png/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘png’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/local/Cellar/r/4.2.2/lib/R/library/00LOCK-png/00new/png/libs/png.so':
dlopen(/usr/local/Cellar/r/4.2.2/lib/R/library/00LOCK-png/00new/png/libs/png.so, 6): Library not loaded: #rpath/libz.1.dylib
Referenced from: /usr/local/Cellar/r/4.2.2/lib/R/library/00LOCK-png/00new/png/libs/png.so
Reason: image not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/Cellar/r/4.2.2/lib/R/library/png’
Warning in install.packages :
installation of package ‘png’ had non-zero exit status
ERROR: dependency ‘png’ is not available for package ‘RgoogleMaps’
* removing ‘/usr/local/Cellar/r/4.2.2/lib/R/library/RgoogleMaps’
Warning in install.packages :
installation of package ‘RgoogleMaps’ had non-zero exit status
ERROR: dependencies ‘RgoogleMaps’, ‘png’ are not available for package ‘ggmap’
* removing ‘/usr/local/Cellar/r/4.2.2/lib/R/library/ggmap’
Warning in install.packages :
installation of package ‘ggmap’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/fd/7vyffy191_l3j6fhyqbvsn0r0000gn/T/RtmptKSXHF/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Error in library(ggmap) : there is no package called ‘ggmap’
I am installing all the dependencies that the error says are missing. By adding the install packages before installing the ggmap itself.

Errors when trying to install 'semPlot' R package

I'm trying to install the package 'semPlot' in RStudio, and keep getting errors:
** testing if installed package can be loaded from temporary location
*** arch - i386
Error: package or namespace load failed for 'rockchalk' in library.dynam(lib, package, package.lib):
DLL 'zip' not found: maybe not installed for this architecture?
Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'
* removing 'C:/Documents/R/win-library/4.0/rockchalk'
Warning in install.packages :
installation of package ‘rockchalk’ had non-zero exit status
ERROR: failed to lock directory 'C:/Documents/R/win-library/4.0' for modifying
Try removing 'C:/Documents/R/win-library/4.0/00LOCK-OpenMx'
Warning in install.packages :
installation of package ‘OpenMx’ had non-zero exit status
ERROR: dependencies 'rockchalk', 'OpenMx' are not available for package 'semPlot'
* removing 'C:/Documents/R/win-library/4.0/semPlot'
Warning in install.packages :
installation of package ‘semPlot’ had non-zero exit status
The downloaded source packages are in
‘C:\AppData\Local\Temp\RtmpE9qK0s\downloaded_packages’
I already installed the package ‘rockchalk’, but it didn't help.
The first time I tried to install 'semPlot' there was an almost endless process which also ended with an error.
You could use the install_github function to install R packages hosted on GitHub from the devtools package. Here is a reproducible example:
devtools::install_github('SachaEpskamp/semPlot')
library(semPlot)
Created on 2022-11-14 with reprex v2.0.2
I solved it by uninstalling R and RStudio, and then installing them, and googling a small problem that came up with tydiverse.

ERROR: lazy loading failed for package ‘omd’

In this question How to install.packages of R 4.2.0?, when I try the code in R
install.packages("devtools")
library("devtools")
install_github("sangwon-hyun/omd", subdir = "omd")
I have tried install goal as the comment on R
install.packages(c('rasterVis', 'rgdal', 'raster', 'sp', 'sf', 'gstat'))
But it still shows that
ERROR: lazy loading failed for package ‘omd’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/omd’
Warning message:
In i.p(...) :
installation of package ‘/var/folders/4v/wwrgppgn1s5dqn1mfv457mqm0000gn/T//RtmpJAqJio/fileafc37eeacc4a/omd_0.0.0.9000.tar.gz’ had non-zero exit status

Error installing R packages (R 3.4.4), asks for usethis when already installed

I'm having the following problem:
When I try to install any R package, at first it downloads the package just fine into a temporal location, and then the following error message appears:
Error: package ‘usethis’ required by ‘devtools’ could not be found
Execution halted
Warning in install.packages :
installation of package ‘lattice’ had non-zero exit status
The wierd part of this is that package usethis is installed and loaded.
Any advise on what can be happening here? I'm a lost there..

Error: installation of package ‘ranger’ had non-zero exit status

I am experiencing great difficulties in installing the package ranger. Here is the error message that I am getting:
ERROR: compilation failed for package ‘ranger’
* removing ‘/home/ibraim/R/x86_64-pc-linux-gnu-library/3.5/ranger’
Warning in install.packages :
installation of package ‘ranger’ had non-zero exit status
I also tried the installation by using devtools, which did not work. Do you have any suggestion how to solve this problem?

Resources