RStudio Shiny wrong version 1. vs. 0.14.1 - r

When I am running my shiny app in RStudio I get an error message:
packages not found. shiny 1.0 required but 0.14.1. available. Check "repos" Option.
I have tried everything but no luck.
** Update
No I have downloaded the package directly from CRAN, this was the result:
install.packages("C:/Users/mbaer/Downloads/shiny_1.1.0.tar.gz",
repos = NULL, type = "source")
Installing package into ‘C:/Users/mbaer/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
ERROR: dependencies 'later', 'promises', 'rlang' are not available for package 'shiny'
* removing 'C:/Users/mbaer/Documents/R/win-library/3.3/shiny'
Warning in install.packages :
running command '"C:/PROGRA~1/MIE74D~1/RCLIEN~1/R_SERVER/bin/x64/R" CMD INSTALL -l "C:\Users\mbaer\Documents\R\win-library\3.3" "C:/Users/mbaer/Downloads/shiny_1.1.0.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/mbaer/Downloads/shiny_1.1.0.tar.gz’ had non-zero exit status
This is a picture
I have no idea. This is a screenshot.

I found the solution:
Tools--> Global Options --> General--> R Version
wrong R Version was selected. #fail
Thank you so much for your attention to my post. Thank you all.

This answer still left me wondering a little, so I thought I'd add a bit. This led me to switching from 64-bit R to 32-bit R. Had to re-install all my packages, but then it worked!

Related

Unable to install the disgenet2r package

library(devtools)
install_bitbucket("ibi_group/disgenet2r")
Unable to install dependencies such as SPARQL
ERROR: dependency ‘SPARQL’ is not available for package ‘disgenet2r’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/disgenet2r’
Warning messages:
1: package ‘SPARQL’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
2: In i.p(...) :
installation of package ‘/var/folders/43/7hr3j7q17tn0ns1g67l5vbq80000gn/T//Rtmptk5KoF/file2d1b24460f94/disgenet2r_0.99.2.tar.gz’ had non-zero exit status
Installing of library(disgenet2r) for further OMIM research
OK, so, the version of something needs to change. I will assume your R version will remain fixed.
I don't know what version of SPARQL you're on, but this is the latest:
install.packages("https://cran.r-project.org/src/contrib/Archive/SPARQL/SPARQL_1.16.1.tar.gz", repos=NULL, type="source")
Try it again after that. If it's still not working then try:
install.packages("devtools")
devtools::install_version("disgenet2r", version = "0.99.1")

Issues installing archived package versions

I have Rv4.2.2, Rstudio 2022.07.2-576, Rtools 4.3, and windows 10. I am attempting to install an old version of a package (specifically wdman) in order to hopefully solve an issue with RSelenium. However, I am getting an error that installation of the package had a non-zero exit status. I have tried with multiple different packages, so the issue seems to be with the methods of installation rather than in the package itself.
I have tried several different methods of installing packages, including all of those shown here. These methods include using
# 1 -----
devtools::install_version("wdman", version = "0.2.5", repos = "http://cran.us.r-project.org")
# 2 -----
remotes::install_version("wdman", version = "0.2.5", repos = "http://cran.us.r-project.org")
# 3 -----
url <- "https://cran.r-project.org/src/contrib/Archive/wdman/wdman_0.2.5.tar.gz"
pkgFile <- "wdman_0.2.5.tar.gz"
install.packages(pkgs=pkgFile, type="source", repos=NULL)
I have also tried installing through the install button in the packages window in RStudio. I specifically get an output saying:
Downloading package from url: http://cran.us.r-project.org/src/contrib/Archive/wdman/wdman_0.2.5.tar.gz
Installing package into ‘C:/Users/sck11/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
Warning message:
In i.p(...) :
installation of package ‘C:/Users/sck11/AppData/Local/Temp/RtmpmWqVmX/remotese545bc06de0/wdman’ had non-zero exit status
I am not sure what else to try, as every method of installing the old package versions either gives me this error or just says that the installation had a non-zero exit status. In addition to different installation methods I have also tried adjusting firewall settings to make sure that this is not blocking the installation, but no success there either. Any help would be greatly appreciated.

Caret package failed to install

I am getting this errors trying to install caret package:
ERROR: compilation failed for package ‘ddalpha’
* removing ‘/home/rspark/R/x86_64-redhat-linux-gnu-library/3.3/ddalpha’
Warning in install.packages :
installation of package ‘ddalpha’ had non-zero exit status
ERROR: dependency ‘ddalpha’ is not available for package ‘recipes’
* removing ‘/home/rspark/R/x86_64-redhat-linux-gnu-library/3.3/recipes’
Warning in install.packages :
installation of package ‘recipes’ had non-zero exit status
ERROR: dependency ‘recipes’ is not available for package ‘caret’
* removing ‘/home/rspark/R/x86_64-redhat-linux-gnu-library/3.3/caret’
Warning in install.packages :
installation of package ‘caret’ had non-zero exit status
Any ideas?
install.packages("ddalpha")
It gives the same error:
/usr/lib64/R/library/BH/include/boost/exception/exception.hpp:137: error: expected declaration before end of line
make: *** [AlphaProcedure.o] Error 1
ERROR: compilation failed for package ‘ddalpha’
* removing ‘/home/rspark/R/x86_64-redhat-linux-gnu-library/3.3/ddalpha’
I have found a solution.
I had the same problem. After installing caret with all its dependencies, ddalpha was not installed. Then I tried installing the package ddalpha alone. I got the message:
" There is a binary version available but the source version is later:
binary source needs_compilation
ddalpha 1.2.1 1.3.1 TRUE
Do you want to install from sources the package which needs compilation?
y/n: n"
Well, if I anwser yes, it doesn't work. But when I answer no, it does work. It looks like the new version has some problem, but the previous one works fine.
As Roman indicated in the comments, ddalpha and recipes are dependencies that aren't installed yet. You can manually install them as follows:
install.packages(c('ddalpha', 'recipes'))
Alternatively, you can tell the install.packages() command to grab the necessary packages during the install process.
install.packages('caret', dependencies=TRUE)
Or list them explicitly:
install.packages('caret', dependencies=c('ddalpha', 'recipes'))
Or, if you use an IDE such as RStudio, the package manager that's included will automatically handle these dependencies for you.
If these suggestions don't solve the problem, you may try updating your instance of R to the latest (3.4.1 as I write this). Also, ddalpha is dependent on the Rcpp package version 0.11.0 or greater, so you may update that package.
update.packages('Rcpp')
I was facing the same issues, and I had tried almost all the methods mentioned here. But the only one that worked for me was updating my IDE and that sorted it out.
I had the same issue, running
install.packages('caret', dependencies=TRUE)
from console solved it. I don't know why at the packages window install with "install dependencies" checked didn't work..
R studio: 2022.07.1
R: 3.6.3

Quantstrat and Windows

I've looked at previous correspondence, have followed the advice but am still unable to install quantstrat and blotter. I'm at a loss. Perhaps I've missed a previous post which would help and would be grateful if someone could point me in the right direction. Many thanks.
Actions: I downloaded the quantstrat pack and issued the following command:
install.packages("C:/Users/George/Downloads/quantstrat_0.9.1669.tar", repos = NULL, type="source")
The result was the following:
Installing package into ‘C:/Users/George/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
Warning: invalid package 'C:/Users/George/Downloads/quantstrat_0.9.1669.tar'
Error: ERROR: no packages specified
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\George\Documents\R\win-library\3.2" "C:/Users/George/Downloads/quantstrat_0.9.1669.tar"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/George/Downloads/quantstrat_0.9.1669.tar’ had non-zero exit status
I should add that I have Rx64 3.2 installed.
Success, cracked the problem. I downloaded the .zip version of quantstrat and blotter (currently both are 3.1.3) and both installed successfully. Interesting.
I notice there is no supporting documentation - is that the case? Thanks.
The solution was: I downloaded the .zip version of quantstrat and blotter (currently both are 3.1.3) and both installed successfully. Interesting.

Causes of "Error: package '_____' was built before 3.0.0: please re-install it" in R

On one computer running R 2.15.2 I have installed packages from a .zip file (these packages happened to be ggplot2 and data.table, but I don't think the specific package is my issue.) Everything works fine. I took these packages to a computer without an internet connection and installed them. This other computer is running R 3.0.1. The packages seemed to install without a problem (using R's "install package(s) from local zip file" option). When I call the packages with the library(), I get the following error:
Error: package '<insert name of newly installed package here>' was build before 3.0.0: please-re-install it
Can anyone explain potential causes for this error to be thrown? Are there particular directories that the .zip packages must be in for a proper install? If R is installed on a separate partition from where the .zip packages were loaded, could this cause the error?
I'm at a loss, any pointers are greatly appreciated. This is a difficult one to reproduce; if you need any other version/system parameters to understand the problem, please don't hesitate to ask.
I found this solution while look at GitHub ggplot2 issue #796
update.packages(checkBuilt = TRUE, ask = FALSE)
It will update all the packages that need to be reinstalled.
Running install.packages("codetools") can fix this issue for R 3.0.2, if you have the same problem like me:
installing to /home/user/R/x86_64-pc-linux-gnu-library/3.0/Rcpp/libs
** R
** inst
** preparing package for lazy loading
Error : package ‘**codetools**’ was built before R 3.0.0: please re-install it
Error : unable to load R code in package ‘Rcpp’
ERROR: lazy loading failed for package ‘Rcpp’
I installed shiny according https://github.com/rstudio/shiny-server/wiki/Ubuntu-step-by-step-install-instructions
and got the same error at the step
sudo su - -c "R -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\""
Warning messages:
1: In install.packages("shiny", repos = "http://cran.rstudio.com/") :
installation of package ‘Rcpp’ had non-zero exit status
2: In install.packages("shiny", repos = "http://cran.rstudio.com/") :
installation of package ‘httpuv’ had non-zero exit status
3: In install.packages("shiny", repos = "http://cran.rstudio.com/") :
installation of package ‘shiny’ had non-zero exit status
I tried the answer by Richard Lee by starting R
R
and got the error
Warning in install.packages("shiny") :
'lib = "/usr/local/lib/R/site-library"' is not writable
Would you like to use a personal library instead? (y/n) n
Error in install.packages("shiny") : unable to install packages
obviously no write permission, so
sudo R
Now I tried again
install.packages("shiny")
and got a number of errors
Error : package ‘codetools’ was built before R 3.0.0: please re-install it
Error : package ‘RJSONIO’ was built before R 3.0.0: please re-install it
Error : package ‘caTools’ was built before R 3.0.0: please re-install it
Error : package ‘bitops’ was built before R 3.0.0: please re-install it
Error : package ‘digest’ was built before R 3.0.0: please re-install it
Error : package ‘xtable’ was built before R 3.0.0: please re-install it
Each time I got an error, I re-installed the requested package
install.packages("codetools")
install.packages("RJSONIO")
etc.
and eventually, I was able to install Rccp, httpuv, and even shiny.
Now it works!!
Also see
Shiny package installation on R version 3.0.2 "Frisbee Sailing"
I am using rkward on precise
I had a similar error using rkward. Specifically this one:
'lib = "/usr/local/lib/R/site-library"' is not writable
I temporarily changed the permissions for this directory so that rkward could run this from its console:
update.packages(checkBuilt = TRUE, ask = FALSE)
all to fix this:
Error: package '' was build before 3.0.0: please-re-install it
so that (sigh...) I could fix 'default' configuration for audio on precise. I couldn't use play() etc. in rkward.
That just needed phonon-backend-gtstreamer
I tried to install swirl on R(v3.1.0) on ubuntu 12.04LTS:
sudo R
install.packages("swirl")
But faced a similar error:
Error : package ‘codetools’ was built before R 3.0.0: please re-install it
Error : unable to load R code in package ‘httr’
ERROR: lazy loading failed for package ‘httr’
* removing ‘/usr/local/lib/R/site-library/httr’
ERROR: dependencies ‘testthat’, ‘httr’ are not available for package ‘swirl’
* removing ‘/usr/local/lib/R/site-library/swirl’
Doing following helped me:
install.packages('codetools')
install.packages("swirl")
library("swirl")
swirl()
| Welcome to swirl! Please sign in. If you've been here before, use the same
| name as you did then. If you are new, call yourself something unique.
What shall I call you?
I hope the same may help fix your installation issue.
Here is the work-around that I used:
I installed the latest version of R on an internet-capable computer. I then loaded the my required packages (Packages->install packages->select mirror->select package...
After R is finished installing, it displays a message of where the temporary .zip package is located. I navigated to this location, grabbed the temp package, and burnt it to a cd.
In this way, I could get the newer package build onto a computer without internet access. I would still be interested to know if there is an easy way to rebuild a package downloaded on an early R version to make it compatible with the latest version (without needed an internet connection).
Thanks for pointing me in the right direction #JoshuaUlrich

Resources