Unable to install ggplot2 package in R on windows 8.1 - r

I tried to install ggplot2 with following commands, but it can't install.
> library('ggplot2')
Error in library("ggplot2") : there is no package called ‘ggplot2’\
> install.packages('ggplot2', dependencies = T)
package ‘ggplot2’ is available as a source package but not as a binary
Warning in install.packages :
package ‘ggplot2’ is not available (as a binary package for R version 3.1.3)
>
Can you anybody advise what's going wrong?
When i use the command install.packages("ggplot2", type="source",dependencies = TRUE) I got following error
*** arch - i386
Warning: running command 'make -f "D:/R/R-31~1.3/etc/i386/Makeconf" -f "D:/R/R-31~1.3/share/make/winshlib.mk" SHLIB="acepack.dll" SHLIB_LIBADD='$(FLIBS)' OBJECTS="ace.o avas.o rlsmo.o"' had status 127
ERROR: compilation failed for package 'acepack'
* removing 'D:/R/R-3.1.3/library/acepack'
Warning in install.packages :
running command '"D:/R/R-31~1.3/bin/x64/R" CMD INSTALL -l "D:\R\R-3.1.3\library" C:\Users\surjya\AppData\Local\Temp\RtmpWyq9oh/downloaded_packages/acepack_1.3-3.3.tar.gz' had status 1
Warning in install.packages :
installation of package ‘acepack’ had non-zero exit status

Sometimes the mirrors take a long time to update, and they don't pick up the binaries of a package for a few days.
Try install.packages("ggplot2", type="source")
...which, from memory, often works on Windows.

Related

install daewr package in R 4.0

hi i am trying to install package for experiment designs like this
install.packages("daewr", dependencies = T)
but it returns the following
configure: error: GNU MP not found, or not 4.1.4 or up, see http://gmplib.org
ERROR: configuration failed for package ‘gmp’
* removing ‘/home/yeferson/R/x86_64-pc-linux-gnu-library/4.0/gmp’
Warning in install.packages :
installation of package ‘gmp’ had non-zero exit status
ERROR: dependency ‘gmp’ is not available for package ‘partitions’
* removing ‘/home/yeferson/R/x86_64-pc-linux-gnu-library/4.0/partitions’
Warning in install.packages :
installation of package ‘partitions’ had non-zero exit status
ERROR: dependency ‘partitions’ is not available for package ‘DoE.base’
* removing ‘/home/yeferson/R/x86_64-pc-linux-gnu-library/4.0/DoE.base’
Warning in install.packages :
installation of package ‘DoE.base’ had non-zero exit status
ERROR: dependency ‘DoE.base’ is not available for package ‘FrF2’
* removing ‘/home/yeferson/R/x86_64-pc-linux-gnu-library/4.0/FrF2’
Warning in install.packages :
installation of package ‘FrF2’ had non-zero exit status
ERROR: dependency ‘FrF2’ is not available for package ‘daewr’
* removing ‘/home/yeferson/R/x86_64-pc-linux-gnu-library/4.0/daewr’
Warning in install.packages :
installation of package ‘daewr’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpB1bSe0/downloaded_packages’
so i decided to download the file from https://cran.r-project.org/web/packages/daewr/index.html
after trying to install it returns me
also installing the dependencies ‘gmp’, ‘partitions’, ‘DoE.base’, ‘FrF2.catlg128’
I try to install the first one but it asks for a Bessel package and it still gives me problems
I solved it by installing dependency one by one, many answer you install the dependencies but they do not say how I will explain them for the new ones in linux and in R to install the daerw package with the aforementioned problems, install the following in the linux console
sudo apt-get install libgsl-dev
with that install libraries now I can open R and install
install.packages('gsl')
then I opened the linux console again and installed
sudo apt-get install libgmp-dev
I go back to R and install
install.packages("gmp", dependencies = T)
now I can install the package without problems
install.packages("daewr", dependencies = T)
library(daewr)
I hope that any comment is welcome.

Could not install R package source in R-studio

I have a source of one R package (http://stat.snu.ac.kr/heeseok/autots). I would like to install it in R-studio, however, I got an error.
Here is my try:
install.packages("/Users/Mary/Downloads/autots_2.3.3.tar.gz", repos=NULL, type="source")
Here is the error:
ERROR: dependencies ‘fBasics’, ‘fNonlinear’, ‘fGarch’, ‘fUtilities’, ‘tsDyn’, ‘tseriesChaos’ are not available for package ‘autots’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/autots’
Warning in install.packages :
installation of package ‘/Users/Mary/Downloads/autots_2.3.3.tar.gz’ had non-zero exit status

How to fix 'libproj not found in standard or given locations' error in r

I'm trying to install the 'agricolae' package on R, but I get an error saying
configure: error: libproj not found in standard or given locations.
ERROR: configuration failed for package ‘sf’
* removing ‘/R/x86_64-pc-linux-gnu-library/3.6/sf’
Warning in install.packages :
installation of package ‘sf’ had non-zero exit status
ERROR: dependency ‘sf’ is not available for package ‘spdep’
* removing ‘/R/x86_64-pc-linux-gnu-library/3.6/spdep’
Warning in install.packages :
installation of package ‘spdep’ had non-zero exit status
ERROR: dependency ‘spdep’ is not available for package ‘agricolae’
* removing ‘/R/x86_64-pc-linux-gnu-library/3.6/agricolae’
Warning in install.packages :
installation of package ‘agricolae’ had non-zero exit status
I recently upgraded to Ubuntu 18.04.2 and R version 3.6.0 (2019-04-26) -- "Planting of a Tree" and that's when the problems started.
When I do
$ sudo apt-get install -y libproj-dev
I get:
libproj-dev is already the newest version (5.2.0-1~bionic0).
The error says that package 'sf' is not available for dependency 'spdep'. So you should be attempting to install pkg 'sf'. (I'm on the same OS as you and pkg:agricolae installed without problem just now. I have a more complete set of spatial R and system packages than you do.)
Edit: There have been reports that it was necessary in addressing this problem to create an environment link to the location of your libraries:
$ export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib
(From: https://stat.ethz.ch/pipermail/r-sig-geo/2018-August/026740.html which in turn linked to https://gis.stackexchange.com/questions/157059/repairing-broken-gdal-and-proj-4-on-ubuntu, which has so further debugging options mentioned.)

Installation of archived package "prob" not working in R

I'm running R 3.4.2 and R Studio 1.0.153. I want to install the prob package in R. The prob package in an archived file. It is located here. I am trying to install the prob_1.0-0.tar.gz package. I have no problem downloading and opening the package archive file. The code is below, it seems I need to install the fAsianOptions package.
ERROR: dependency 'fAsianOptions' is not available for package 'prob'
* removing 'C:/Users/blake_000/Documents/R/win-library/3.4/prob' Warning in install.packages : running command
'"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l
"C:\Users\blake_000\Documents\R\win-library\3.4"
"C:/Users/BLAKE_~1/GOOGLE~1/Life/CSUEB/FALL20~1/6204-P~1/RCODE~1/prob_1.0-0.tar.gz"'
had status 1 Warning in install.packages : installation of package
‘C:/Users/BLAKE_~1/GOOGLE~1/Life/CSUEB/FALL20~1/6204-P~1/RCODE~1/prob_1.0-0.tar.gz’
had non-zero exit status
Unfortunately, the fAsianOptions package is also archived. It is located here and I downloaded version fAsianOptions_3010.79.tar.gz. There were a number of dependencies but I installed the required packages (timeDate, timeSeries, etc.)
However, the fAsianOptions package is not installing. The error code reads as follows:
install.packages("C:/Users/blake_000/Google Drive/Life/CSUEB/Fall
2017/6204- Probability/R Code/fAsianOptions_3010.79.tar.gz", repos =
NULL, type = "source") Installing package into
‘C:/Users/blake_000/Documents/R/win-library/3.4’ (as ‘lib’ is
unspecified)
* installing source package 'fAsianOptions' ...
** package 'fAsianOptions' successfully unpacked and MD5 sums checked
** libs
*** arch - i386 Warning: running command 'make -f "Makevars" -f "C:/PROGRA~1/R/R-34~1.2/etc/i386/Makeconf" -f
"C:/PROGRA~1/R/R-34~1.2/share/make/winshlib.mk"
SHLIB="fAsianOptions.dll" SHLIB_LIBADD='$(FLIBS)'
OBJECTS="EBMAsianOptions.o GammaFunctions.o
HypergeometricFunctions.o"' had status 127 ERROR: compilation failed
for package 'fAsianOptions'
* removing 'C:/Users/blake_000/Documents/R/win-library/3.4/fAsianOptions' Warning
in install.packages : running command
'"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l
"C:\Users\blake_000\Documents\R\win-library\3.4"
"C:/Users/BLAKE_~1/GOOGLE~1/Life/CSUEB/FALL20~1/6204-P~1/RCODE~1/fAsianOptions_3010.79.tar.gz"'
had status 1 Warning in install.packages : installation of package
‘C:/Users/BLAKE_~1/GOOGLE~1/Life/CSUEB/FALL20~1/6204-P~1/RCODE~1/fAsianOptions_3010.79.tar.gz’
had non-zero exit status
I'm hoping that someone can help me to install the fAsianOptions dependency so I can install the prob package. Or, if there's an easier way, please let me know!
I had the same problem. I solved it by installing lower version of R -2.9. prob is available in repository for this version.

Installing local package on R 3.2.2 failed

Installing an old version of caret on my custom R version was a burden.
I tried using the RStudio installation tool, but failed
I tried the command:
pathToFile <- "C:/Users/Fsociety/Desktop/caret_5.17-7.tar"
install.packages(pathToFile,repos = NULL, type = "source")
I got this error:
Warning: invalid package 'C:/Users/Fsociety/Desktop/caret_5.17-7.tar'
Error: ERROR: no packages specified
Warning in install.packages :
running command '"C:/PROGRA~1/RRO/RRO-32~1.0/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Fsociety\Documents\R\win-library\3.2" "C:/Users/Fsociety/Desktop/caret_5.17-7.tar"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/Fsociety/Desktop/caret_5.17-7.tar’ had non-zero exit status
Is there any thing wrong with the install.package that I can fix?

Resources