dependency 'quadprog' is not available for installing package 'bfast' - r

i am trying to install the package "bfast" in R studio running R 3.5.3 and it throws up dependency error Warning in install.packages :
dependency ‘quadprog’ is not available
i tried installing it using install.packages("bfast") and when i received the dependency error, i tried to install quadprog dependency as a package seperately like install.packages("quadprog") but then it showed me this error,Warning in install.packages :
package ‘quadprog’ is not available (for R version 3.5.3)
here is the console status while installing bfast package.
install.packages("bfast")
Installing package into ‘/home/rehan/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘quadprog’ is not available
also installing the dependencies ‘tseries’, ‘forecast’
trying URL 'https://cloud.r-project.org/src/contrib/tseries_0.10-46.tar.gz'
Content type 'application/x-gzip' length 164471 bytes (160 KB)
==================================================
downloaded 160 KB
trying URL 'https://cloud.r-project.org/src/contrib/forecast_8.6.tar.gz'
Content type 'application/x-gzip' length 908972 bytes (887 KB)
==================================================
downloaded 887 KB
trying URL 'https://cloud.r-project.org/src/contrib/bfast_1.5.7.tar.gz'
Content type 'application/x-gzip' length 59697 bytes (58 KB)
==================================================
downloaded 58 KB
ERROR: dependency ‘quadprog’ is not available for package ‘tseries’
* removing ‘/home/rehan/R/x86_64-pc-linux-gnu-library/3.5/tseries’
Warning in install.packages :
installation of package ‘tseries’ had non-zero exit status
ERROR: dependency ‘tseries’ is not available for package ‘forecast’
* removing ‘/home/rehan/R/x86_64-pc-linux-gnu-library/3.5/forecast’
Warning in install.packages :
installation of package ‘forecast’ had non-zero exit status
ERROR: dependency ‘forecast’ is not available for package ‘bfast’
* removing ‘/home/rehan/R/x86_64-pc-linux-gnu-library/3.5/bfast’
Warning in install.packages :
installation of package ‘bfast’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpSfjWA6/downloaded_packages’
How can i properly install the package with all it's dependencies?

I just had the same problem. I looked where R was looking from (https://cran.rstudio.com/bin/windows/contrib/3.5/) and downloaded the 'quadprog' zip file from there. Then, in R or Rstudio, you go to install packages from "package archive file". It worked for me, I hope it does for you.

There is a new version of Quadprog: 1.5-7 that can install on R above 3.1:https://cran.r-project.org/web/packages/quadprog/index.html
That solved it for me.

Related

Having problems installing.packag("BatchGetSymbols")

I can't install.package("BatchGetSymbols") for some reason.
I am just doing this:
install.packages('BatchGetSymbols')
library(BatchGetSymbols)
and i am getting this:
> install.packages('BatchGetSymbols')
Installing package into ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘XML’ is not available
trying URL 'https://cran.rstudio.com/src/contrib/BatchGetSymbols_2.5.7.tar.gz'
Content type 'application/x-gzip' length 181321 bytes (177 KB)
==================================================
downloaded 177 KB
ERROR: dependency ‘XML’ is not available for package ‘BatchGetSymbols’
* removing ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/3.6/BatchGetSymbols’
Warning in install.packages :
installation of package ‘BatchGetSymbols’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpAhaAos/downloaded_packages’
> library(BatchGetSymbols)
Error in library(BatchGetSymbols) :
there is no package called ‘BatchGetSymbols’
Does anyone understand why there is a problem??
Install the latest version of R before
Commands to install: https://cloud.r-project.org/bin/linux/
Choose the version of your system and run the commands
After that try to install the library.

Unable to install the car package in R Studio in Windows 10

I'm running RStudio v1.2.5019.
The User folder on my laptop where the packages are stored is C:\Users\R Shiva
I am trying to install packages including car but I'm getting the following error.
Installing package into ‘C:/Users/R Shiva/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependency ‘carData’
There are binary versions available but the source versions are later:
binary source needs_compilation
carData 3.0-2 3.0-3 FALSE
car 3.0-4 3.0-5 FALSE
installing the source packages ‘carData’, ‘car’
trying URL 'https://cran.rstudio.com/src/contrib/carData_3.0-3.tar.gz'
Content type 'application/x-gzip' length 995544 bytes (972 KB)
downloaded 972 KB
trying URL 'https://cran.rstudio.com/src/contrib/car_3.0-5.tar.gz'
Content type 'application/x-gzip' length 504300 bytes (492 KB)
downloaded 492 KB
Warning: invalid package 'C:\Users\R'
Warning: invalid package 'Shiva\AppData\Local\Temp\RtmpU7R8OM/downloaded_packages/carData_3.0-3.tar.gz'
Error: ERROR: no packages specified
Warning in install.packages :
installation of package ‘carData’ had non-zero exit status
Warning: invalid package 'C:\Users\R'
Warning: invalid package 'Shiva\AppData\Local\Temp\RtmpU7R8OM/downloaded_packages/car_3.0-5.tar.gz'
Error: ERROR: no packages specified
Warning in install.packages :
installation of package ‘car’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\R Shiva\AppData\Local\Temp\RtmpU7R8OM\downloaded_packages’

How to install caret package. Tried install.packages("caret") but getting error

After install.packages("caret") getting below error:
Installing package into ‘...../R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘rlang’, ‘recipes’
There are binary versions available but the source versions are later:
binary source needs_compilation
rlang 0.3.4 0.4.0 TRUE
recipes 0.1.5 0.1.6 FALSE
caret 6.0-81 6.0-84 TRUE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/rlang_0.3.4.zip'
Content type 'application/zip' length 1080437 bytes (1.0 MB)
downloaded 1.0 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/caret_6.0-81.zip'
Content type 'application/zip' length 5392174 bytes (5.1 MB)
downloaded 5.1 MB
package ‘rlang’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘rlang’
package ‘caret’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
.........\Temp\RtmpkJG4l1\downloaded_packages
installing the source package ‘recipes’
trying URL 'https://cran.rstudio.com/src/contrib/recipes_0.1.6.tar.gz'
Content type 'application/x-gzip' length 968331 bytes (945 KB)
downloaded 945 KB
ERROR: dependency 'rlang' is not available for package 'recipes'
* removing 'C:/Users/PBiradarP/Documents/R/win-library/3.4/recipes'
In R CMD INSTALL
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" CMD INSTALL -l "......\R\win-library\3.4"
...../Temp\RtmpkJG4l1/downloaded_packages/recipes_0.1.6.tar.gz' had status 1
Warning in install.packages :
installation of package ‘recipes’ had non-zero exit status
I have tried and installed "rlang" package also. Its dependent on "recepies" package so again downloaded that too...
getting this message after installing this.
:Warning in install.packages :
package ‘recepies’ is not available (for R version 3.4.4)
I need to load caret package to be installed.
If you are using Windows, try this:
Add your library to libpaths; see this answer. After that try installing packages; see this answer:
install.packages("caret", dependencies=TRUE, type="win.binary")

Installation of package. "had non-zero exit status" error. "S3 methods" error

I need the MVN package for multivariate normality test.
During it's installation, my laptop turned off.
After it restarted when I wanted to install MVN again, I got various "had non-zero exit status" that were gone after installing libcurl etc.
But now, I have other errors.
> install.packages("MVN")
Installing package into ‘/home/mslaav/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependency ‘kableExtra’
próbowanie adresu URL 'https://cloud.r-project.org/src/contrib/kableExtra_0.9.0.tar.gz'
Content type 'application/x-gzip' length 1638582 bytes (1.6 MB)
==================================================
downloaded 1.6 MB
próbowanie adresu URL 'https://cloud.r-project.org/src/contrib/MVN_5.5.tar.gz'
Content type 'application/x-gzip' length 342047 bytes (334 KB)
==================================================
downloaded 334 KB
* installing *source* package ‘kableExtra’ ...
** pakiet ‘kableExtra’ został pomyślnie rozpakowany oraz sumy MD5 zostały sprawdzone
** R
** inst
** preparing package for lazy loading
Ostrzeżenie: S3 methods ‘[.spec_tbl_df’, ‘as.col_spec.NULL’, ‘as.col_spec.character’, ‘as.col_spec.col_spec’, ‘as.col_spec.default’, ‘as.col_spec.list’, ‘format.col_spec’, ‘output_column.POSIXt’, ‘output_column.default’, ‘output_column.double’, ‘print.col_spec’, ‘print.collector’, ‘print.date_names’, ‘print.locale’, ‘str.col_spec’ were declared in NAMESPACE but not found
Error in library.dynam(lib, package, package.lib) :
shared object ‘readr.so’ not found
ERROR: lazy loading failed for package ‘kableExtra’
* removing ‘/home/mslaav/R/x86_64-pc-linux-gnu-library/3.4/kableExtra’
Warning in install.packages :
installation of package ‘kableExtra’ had non-zero exit status
ERROR: dependency ‘kableExtra’ is not available for package ‘MVN’
* removing ‘/home/mslaav/R/x86_64-pc-linux-gnu-library/3.4/MVN’
Warning in install.packages :
installation of package ‘MVN’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpF6Tden/downloaded_packages’
I tried reinstalling R and Rstudio, but it didn't help.

How to install packages in R or Rstudio

when trying to install a package:
> install.packages("mlr")
Installing package into ‘/home/kisco/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependencies ‘plyr’, ‘dplyr’, ‘lazyeval’ are not available
also installing the dependencies ‘scales’, ‘ggplot2’, ‘ggvis’, ‘reshape2’
trying URL 'http://cran.rstudio.com/src/contrib/scales_0.2.5.tar.gz'
Content type 'application/x-gzip' length 56346 bytes (55 Kb)
opened URL
==================================================
downloaded 55 Kb
trying URL 'http://cran.rstudio.com/src/contrib/ggplot2_1.0.1.tar.gz'
Content type 'application/x-gzip' length 2351203 bytes (2.2 Mb)
opened URL
==================================================
downloaded 2.2 Mb
trying URL 'http://cran.rstudio.com/src/contrib/ggvis_0.4.2.tar.gz'
Content type 'application/x-gzip' length 728345 bytes (711 Kb)
opened URL
==================================================
downloaded 711 Kb
trying URL 'http://cran.rstudio.com/src/contrib/reshape2_1.4.1.tar.gz'
Content type 'application/x-gzip' length 34693 bytes (33 Kb)
opened URL
==================================================
downloaded 33 Kb
trying URL 'http://cran.rstudio.com/src/contrib/mlr_2.4.tar.gz'
Content type 'application/x-gzip' length 440988 bytes (430 Kb)
opened URL
==================================================
downloaded 430 Kb
ERROR: dependency ‘plyr’ is not available for package ‘scales’
* removing ‘/home/kisco/R/x86_64-pc-linux-gnu-library/3.0/scales’
Warning in install.packages :
installation of package ‘scales’ had non-zero exit status
ERROR: dependencies ‘dplyr’, ‘lazyeval’ are not available for package ‘ggvis’
* removing ‘/home/kisco/R/x86_64-pc-linux-gnu-library/3.0/ggvis’
Warning in install.packages :
installation of package ‘ggvis’ had non-zero exit status
ERROR: dependency ‘plyr’ is not available for package ‘reshape2’
* removing ‘/home/kisco/R/x86_64-pc-linux-gnu-library/3.0/reshape2’
Warning in install.packages :
installation of package ‘reshape2’ had non-zero exit status
ERROR: dependencies ‘plyr’, ‘reshape2’, ‘scales’ are not available for package ‘ggplot2’
* removing ‘/home/kisco/R/x86_64-pc-linux-gnu-library/3.0/ggplot2’
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
ERROR: dependencies ‘ggplot2’, ‘ggvis’, ‘plyr’, ‘reshape2’ are not available for package ‘mlr’
removing ‘/home/kisco/R/x86_64-pc-linux-gnu-library/3.0/mlr’
Warning in install.packages :
installation of package ‘mlr’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmp3AjleG/downloaded_packages’
I keep getting th eerror" warning in install.packages insallation of package ... had non zero exit status.
What am I doing wrong? How do I Install MLR?
You have an outdated version of R. Normally dplyr and your other dependencies would be automatically installed, but in this case they are labelled as not working with older versions of R, so throw an error.
You have version 3.0.2, which is out of date. As of now the current version is 3.2.1. You should upgrade (you don't have the most up to date version of r-base, repos are often behind - try getting the binary from here).
If you don't want to update you can use the methods described in answers to this question to install older versions of the packages which may be compatible with your version - install older version of R package.

Resources