R error message when calling libraries and installing packages - r

I started to get some error message in R when calling libraries that usually work very well. I decided to re-install the packages that were concerned, and also ran into some error..
Any idea what's going on? I'm about to throw my computer thru the window..
> library( "DESeq2" )
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘plyr’
Error: package or namespace load failed for ‘DESeq2’
> install.packages("plyr_1.8.2.tar.gz", repos = NULL, type="source")
Installing package into ‘C:/Users/Sun/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
* installing *source* package 'plyr' ...
** package 'plyr' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
Warning: running command 'make -f "C:/PROGRA~1/R/R-32~1.0/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.0/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="plyr.dll" OBJECTS="RcppExports.o loop-apply.o split-numeric.o"' had status 127
ERROR: compilation failed for package 'plyr'
* removing 'C:/Users/Sun/Documents/R/win-library/3.2/plyr'
Warning messages:
1: running command '"C:/PROGRA~1/R/R-32~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\Sun\Documents\R\win-library\3.2" "plyr_1.8.2.tar.gz"' had status 1
2: In install.packages("plyr_1.8.2.tar.gz", repos = NULL, type = "source") :
installation of package ‘plyr_1.8.2.tar.gz’ had non-zero exit status

Thanks to Joran, installing from CRAN actually solved the issue.
install.packages("plyr")

Related

clang error trying to install R package `ivreg` on mac

I am attempting to install the ivreg package into R (4.0.3) on my Mac (OS Big Sur Intel Version 11.6.8)
I am having what apparently is a fairly common problem installing its dependencies, but I am receiving a slightly different error message. My error message from the command install.packages('ivreg'):
clang: error: -E or -x required when input is from standard input
clang: error: no such file or directory: 'L/usr/local/gfortran/lib'
make: *** [Matrix.so] Error 1
ERROR: compilation failed for package ‘Matrix’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Matrix’
* restoring previous
‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Matrix’
Warning in install.packages :
installation of package ‘Matrix’ had non-zero exit status
* installing *source* package ‘MatrixModels’ ...
** package ‘MatrixModels’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace ‘Matrix’ 1.2-18 is being loaded, but >= 1.4.2 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘MatrixModels’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/MatrixModels’
Warning in install.packages :
installation of package ‘MatrixModels’ had non-zero exit status
ERROR: dependency ‘MatrixModels’ is not available for package ‘quantreg’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/quantreg’
Warning in install.packages :
installation of package ‘quantreg’ had non-zero exit status
ERROR: dependency ‘quantreg’ is not available for package ‘car’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/car’
Warning in install.packages :
installation of package ‘car’ had non-zero exit status
The instrumental bit appears to be the very first two lines, where it's describing something about a gfortran directory. I've tried to install gfortran as well as all of the other dependencies to no avail. When I attempt to do so, I'm told that the packages are unavailable for my version of R.
QUESTION: Is there a way to alleviate this error and install ivreg on my machine?

Error when installing rmarkdown

I have this error when trying to run install.packages("rmarkdown"). Can someone please let me know what's wrong?
installing source package 'rmarkdown' ...
** package 'rmarkdown' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no
package called 'backports' ERROR: lazy loading failed for package
'rmarkdown'
removing 'C:/Program Files/R/R-3.2.3/library/rmarkdown'
restoring previous 'C:/Program Files/R/R-3.2.3/library/rmarkdown' Warning in install.packages : running command
'"C:/PROGRA~1/R/R-32~1.3/bin/x64/R" CMD INSTALL -l "C:\Program
Files\R\R-3.2.3\library"
C:\Users\knguyen\AppData\Local\Temp\Rtmp0KyOP9/downloaded_packages/rmarkdown_1.6.tar.gz'
had status 1 Warning in install.packages : installation of package
‘rmarkdown’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\knguyen\AppData\Local\Temp\Rtmp0KyOP9\downloaded_packages’
Blockquote
Try install the package backports as mentioned in the error.
Try installing the new R Version https://cran.r-project.org/bin/windows/base/old/3.4.3/.
I tried installing R markdown in my R studio, but it keeps looping to ask me to install the package. The R version on my R studio was version 1.1, and after I installed the new R Version, installing the R Markdown package was a success. Hopefully this could help.

backports 1.1.1 package fails to install

I am unable to public my R notebook. When I try to publish, I get the following error:
Console~/
Console
R Markdown
.../R Test 1/Fall Programming with R Test 1.Rmd
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'backports'
Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
I tried to install backports, but it doesn't seem to work either. I get this error when I try to install backports:
> install.packages("backports")
Installing package into ‘C:/Users/agdpa/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
backports 1.1.0 1.1.1 FALSE
installing the source package ‘backports’
trying URL 'https://cran.rstudio.com/src/contrib/backports_1.1.1.tar.gz'
Content type 'application/x-gzip' length 10090 bytes
downloaded 10090 bytes
* installing *source* package 'backports' ...
** package 'backports' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
Warning: running command 'make -f "C:/PROGRA~1/R/R-34~1.1/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-34~1.1/share/make/winshlib.mk" SHLIB="backports.dll" OBJECTS="dotsElt.o dotsLength.o init.o"' had status 127
ERROR: compilation failed for package 'backports'
* removing 'C:/Users/agdpa/Documents/R/win-library/3.4/backports'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\agdpa\Documents\R\win-library\3.4" C:\Users\agdpa\AppData\Local\Temp\Rtmp8IcAL2/downloaded_packages/backports_1.1.1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘backports’ had non-zero exit status
I'm getting a similar error with the backports R package. It's preventing the devtools package from installing a customised package which I've written.
I fixed it by installing the previous version of backports:
require(devtools)
install_version("backports", version = "1.1.0")
I solved it reinstalling Rtools (I'm running of Windows).

Cannot install "flexdashboard package"

I tried installing the flexdashboard package but an error message came up:
Here is the code:
devtools::install_github("rstudio/flexdashboard")
Error Message:
Downloading GitHub repo rstudio/flexdashboard#master
Installing flexdashboard
Installing 1 packages: digest
package ‘digest’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘digest’
"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore \
CMD INSTALL \
"C:/Users/Nicholas/AppData/Local/Temp/RtmpekRfW3/devtools3e9457ae3791/rstudio-flexdashboard-e68ac39" \
--library="C:/Users/Nicholas/Documents/R/win-library/3.2" --install-tests
* installing *source* package 'flexdashboard' ...
** R
** inst
** tests
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'digest'
ERROR: lazy loading failed for package 'flexdashboard'
* removing 'C:/Users/Nicholas/Documents/R/win-library/3.2/flexdashboard'
Error: Command failed (1)
It seems to be crashing because it tries to update the digest package upon which it depends, and fails to remove it because it's in use.
Close R and then navigate to C:/Users/Nicholas/Documents/R/win-library/3.2 and delete the digest folder. Then, launch R and try the install again.

Github Quandl not able to install

When I tried installing quandl it is showing this error message. Can anyone help ??
> install_github("quandl/R-package")
Downloading GitHub repo quandl/R-package#master
Installing Quandl
Installing 1 packages: stringi
package ‘stringi’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘stringi’
"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore CMD INSTALL \
"C:/Users/saikitti/AppData/Local/Temp/RtmpqoWawf/devtools25b4184b2cd/quandl-quandl-r-9182d61" \
--library="C:/Users/saikitti/Documents/R/win-library/3.2" --install-tests
* installing *source* package 'Quandl' ...
** R
** tests
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'stringi'
ERROR: lazy loading failed for package 'Quandl'
* removing 'C:/Users/saikitti/Documents/R/win-library/3.2/Quandl'
Error: Command failed (1)
You missed a Depends::
there is no package called 'stringi'
But Quandl is on CRAN, so why don't you do install.packages("Quandl") ?

Resources