Unable to Install RMarkdown - r

I am trying to install Rmarkdown on Rstudio.
install.packages("rmarkdown")
I receive error messages that include:
configure: error: in `/private/var/folders/z6/pjv553zn1bb39ldgph2klbt40000gn/T/RtmplQkOZY/R.INSTALL7213 13a123d/stringi':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
ERROR: configuration failed for package ‘stringi’
(I also receive other error terms such as
Warning in install.packages :
installation of package ‘stringi’ had non-zero exit status
ERROR: dependency ‘stringi’ is not available for package ‘stringr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/stringr’
There are a few of these that would take up too much space in this question post.)
I have a Mac OS X Lion 10.7.5, and downloaded an xcode on my computer that should have supplied the C compiler, but is not read in rstudio.

Sir try this:
install.packages("stringi", dependencies=TRUE, INSTALL_opts = c('--no-lock'))
install.packages("stringr", dependencies=TRUE, INSTALL_opts = c('--no-lock'))
Then rerun the install.packages("rmarkdown", dependencies=TRUE)

Related

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?

gpclibPermit() is FALSE, cannot install gpclib

I have similar problem as this user, How to turn gpclibPermit() to TRUE
Solution was to install gpclib, but I get error
> install.packages("gpclib")
Package which is only available in source form, and may need compilation of C/C++/Fortran:
‘gpclib’
These will not be installed
Then I download gpclib_1.5-5.tar.gz from http://cran.r-project.org/web/packages/gpclib/index.html and extract to library folder, i.e D:\R\R-3.2.0\library.
When I execute the following, I still get the errors:
> install.packages("gpclib")
Package which is only available in source form, and may need compilation of C/C++/Fortran:
‘gpclib’
These will not be installed
> gpclibPermitStatus()
[1] FALSE
Thanks
Update
I tried
> install.packages("D:/R/gpclib_1.5-5.tar.gz", repos = NULL, type = "source")
and got error
* installing *source* package 'gpclib' ...
** package 'gpclib' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
Warning: running command 'make -f "D:/R/R-3.2.0/etc/i386/Makeconf" -f "D:/R/R-3.2.0/share/make/winshlib.mk" SHLIB="gpclib.dll" OBJECTS="Rgpc.o gpc.o"' had status 127
ERROR: compilation failed for package 'gpclib'
* removing 'D:/R/R-3.2.0/library/gpclib'
Warning in install.packages :
running command '"D:/R/R-3.2.0/bin/x64/R" CMD INSTALL -l "D:\R\R-3.2.0\library" "D:/R/gpclib_1.5-5.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘D:/R/gpclib_1.5-5.tar.gz’ had non-zero exit status
"Extract[ing] to library folder" is not the correct way to install a source package (the .tar.gz you downloaded). Inside R execute
install.packages(path_to_file, repos = NULL, type="source")
More details and approaches can be found at How do I install an R package from source?

Unable to install ggplot2 package in R on windows 8.1

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.

More issues regarding the installation of Rstem package

This question is related to Issues in Installing Rstem Package, but I think the answer provided in the previous one isn't working for my case.
I've downloaded the source package and the installation isn't working correctly. Any help is welcomed!
install.packages("~/Downloads/Rstem_0.4-1.tar.gz", repos = NULL, type = "source")
This is the error I get:
Warning in install.packages :
package ‘~/Downloads/Rstem_0.4-1.tar.gz’ is not available (for R version 2.15.3)
Installing package(s) into ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library’
(as ‘lib’ is unspecified)
* installing *source* package ‘Rstem’ ...
** libs
*** arch - i386
sh: make: command not found
ERROR: compilation failed for package ‘Rstem’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rstem’
Warning in install.packages :
installation of package ‘/Users/mbtangotan/Downloads/Rstem_0.4-1.tar.gz’ had non-zero exit status
Also tried:
install.packages("Rstem", repos = "http://www.omegahat.org/R", type="source")
Got this as output:
trying URL 'http://www.omegahat.org/R/src/contrib/Rstem_0.4-1.tar.gz'
Content type 'application/x-gzip' length 274336 bytes (267 Kb)
opened URL
downloaded 267 Kb
* installing *source* package ‘Rstem’ ...
** libs
*** arch - i386
sh: make: command not found
ERROR: compilation failed for package ‘Rstem’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rstem’
The downloaded source packages are in
‘/private/var/folders/t3/f4r4rwmn7xl80skj6h35ftnh0000gn/T/RtmpWKxXs2/downloaded_packages’
Warning message:
In install.packages("Rstem", repos = "http://www.omegahat.org/R", :
installation of package ‘Rstem’ had non-zero exit status
R Version: 2.15.3, x86_64, OSX.
If make is not found it suggests you need to install an XCode appropriate to your unspecified version of "OSX".
If you did have XCode installed this should succeed (at least it did just now with my MacPro running OSX 10.6.8, R 3.0.0 RC, and XCode 3.2.6 (1761):
install.packages("Rstem", repos = "http://www.omegahat.org/R", type="source")
Whether there might be other problems, I cannot tell. The package was removed from CRAN, so there may be other alligators in the swamp.
FWIW, I have just uploaded to CRAN a new package called SnowballC, which implements the same functions as Rstem and uses the same algorithms. Binary packages for Mac OS X and Windows will be available in a few hours/days.
http://cran.r-project.org/web/packages/SnowballC/

Resources