Cannot install RStudio addins on my Windows laptop from behind proxy - r

My session info (basically it's Microsoft R Open 3.4.1, RStudio 1.0.153, Windows 10 64 bit)
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils
[5] datasets methods base
other attached packages:
[1] RevoUtilsMath_10.0.1
loaded via a namespace (and not attached):
[1] httr_1.3.1 compiler_3.4.1
[3] R6_2.2.0 RevoUtils_10.0.6
[5] tools_3.4.1 withr_2.0.0
[7] curl_2.6 memoise_1.1.0
[9] git2r_0.19.0 digest_0.6.12
[11] devtools_1.13.3
I'm trying to install some RStudio addins without success. Whatever addin I try to install, the recommended procedure of using devtools::install_github (see Installation) fails with the same error message:
> devtools::install_github("benmarwick/wordcountaddin", type = "source", dependencies = TRUE)
Installation failed: Failure when receiving data from the peer
> devtools::install_github("rstudio/addinexamples", type = "source")
Installation failed: Failure when receiving data from the peer
I work behind a company proxy. I am able to install R packages from CRAN without problems:
> install.packages("devtools")
Installing package into ....
(as ‘lib’ is unspecified)
trying URL 'https://mran.microsoft.com/snapshot/2017-09-01/bin/windows/contrib/3.4/devtools_1.13.3.zip'
Content type 'application/zip' length 443758 bytes (433 KB)
downloaded 433 KB
package ‘devtools’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
....
How can I install RStudio addins?

You can install from github using proxy settings with httr package:
library(httr)
with_config(use_proxy(url='proxy url', port = port_number,
username="username", password="yourpass"),
devtools::install_github('github/directory'))

Related

Installation of pkgconfig on Windows

I have successfully installed and loaded readxl package. When I am trying to use the function readxl::read_xlsx(), it throws and error that R cannot find pkgconfig.
I have tried to install this package, but it throws another error, which is presented below:
Installing package into ‘C:/Users/Maintenant Prêt!/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
pkgconfig 2.0.2 2.0.3 FALSE
installing the source package ‘pkgconfig’
trying URL 'https://cran.rstudio.com/src/contrib/pkgconfig_2.0.3.tar.gz'
Content type 'application/x-gzip' length 6080 bytes
downloaded 6080 bytes
* installing *source* package 'pkgconfig' ...
** package 'pkgconfig' successfully unpacked and MD5 sums checked
** using staged installation
Warning in file(file, if (append) "a" else "w") :
cannot open file 'C:/Users/Maintenant Prjt!/Documents/R/win-library/3.6/00LOCK-pkgconfig/00new/pkgconfig/DESCRIPTION': No such file or directory
Error in file(file, if (append) "a" else "w") :
cannot open the connection
ERROR: installing package DESCRIPTION failed for package 'pkgconfig'
* removing 'C:/Users/Maintenant Prêt!/Documents/R/win-library/3.6/pkgconfig'
Warning in install.packages :
installation of package ‘pkgconfig’ had non-zero exit status
I have checked and there are no hidden 00LOCK folders in packages folder, which can conflict with installation. My three suggestions are: (1) either there are no writing rights to this folder (which is wired since all packages are installed normally), (2) or a special symbol ê in the name of the parent folder creates problems.
Does anyone know a workaround?
Here are results of the sessionInfo() and .libPaths():
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] readxl_1.3.1
loaded via a namespace (and not attached):
[1] Rcpp_1.0.2 crayon_1.3.4 assertthat_0.2.1 cellranger_1.1.0
[5] R6_2.4.0 magrittr_1.5 pillar_1.4.2 rlang_0.4.0
[9] rstudioapi_0.10 tools_3.6.1 glue_1.3.1 compiler_3.6.1
and
[1] "C:/Users/Maintenant Prêt!/Documents/R/win-library/3.6"
[2] "C:/Program Files/R/R-3.6.1/library"

Error in installing tidyverse package in Rstudio

I am New to R programming. I am using R studio presently. I received the following error while installing the tidyverse package
Installing package into ‘C:/Users/mandava/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/tidyverse_1.1.1.zip'
Content type 'application/zip' length 41908 bytes (40 KB)
downloaded 40 KB
package ‘tidyverse’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\mandava\AppData\Local\Temp\RtmpGw5Iny\downloaded_packages
My details :
> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets
[6] methods base
loaded via a namespace (and not attached):
[1] tools_3.3.2
Don't worry about the error, the package is installed.

Error with installing an old package

A co-worked built a model using both an older version of R (3.1.3) and an older version of randomForestSRC (1.6.0). I have R version 3.2.1 and randomForestSRC version 1.6.1. I was able to install an older version of the randomForestSRC package using the function InstallOldPackage from the repmis package using R 3.2.1. However, it turns out I need to use the old version (3.1.3) to be able to work on this project. Unfortunately, after switching to 3.1.3 I am having trouble actually installing the older version of the randomForestSRC package.
Here is the system info:
> sessionInfo()
R version 3.1.3 (2015-03-09)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server 2012 x64 (build 9200)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] repmis_0.4.4 randomForestSRC_1.6.1
loaded via a namespace (and not attached):
[1] chron_2.3-47 data.table_1.9.6 digest_0.6.8 httr_1.0.0 magrittr_1.5
[6] plyr_1.8.3 R.cache_0.10.0 R.methodsS3_1.7.0 R.oo_1.19.0 R.utils_2.1.0
[11] R6_2.1.1 Rcpp_0.12.1 stringi_1.0-1 stringr_1.0.0 tools_3.1.3
This is where I run into the error (I apologize for the large block of text):
> library(repmis)
> InstallOldPackages(pkgs = "randomForestSRC",versions = "1.6.0")
trying URL 'http://cran.r- project.org/src/contrib/Archive/randomForestSRC/randomForestSRC_1.6.0.tar.gz'
Content type 'application/x-gzip' length 943881 bytes (921 KB)
opened URL
downloaded 921 KB
* installing *source* package 'randomForestSRC' ...
** package 'randomForestSRC' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
Warning: running command 'make -f "C:/Users/baasman/DOCUME~1/R/R- 31~1.3/etc/i386/Makeconf" -f "C:/Users/baasman/DOCUME~1/R/R- 31~1.3/share/make/winshlib.mk" SHLIB="randomForestSRC.dll" OBJECTS="bootstrap.o classification.o dataParser.o entry.o factorOps.o importance.o impute.o nodeOps.o nrutil.o random.o regression.o rfsrc.o rfsrcUtil.o split.o splitClas.o splitCustom.o splitRegr.o splitSurv.o splitUspv.o splitUtil.o stack.o stackOutput.o stackPreDefined.o survival.o survivalE.o termOps.o trace.o tree.o treeUtil.o"' had status 127
ERROR: compilation failed for package 'randomForestSRC'
* removing 'C:/Users/baasman/Documents/R/R-3.1.3/library/randomForestSRC'
* restoring previous 'C:/Users/baasman/Documents/R/R- 3.1.3/library/randomForestSRC'
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
problem copying C:\Users\baasman\Documents\R\R-3.1.3\library\00LOCK- randomForestSRC\randomForestSRC\libs\x64\randomForestSRC.dll to C:\Users\baasman\Documents\R\R- 3.1.3\library\randomForestSRC\libs\x64\randomForestSRC.dll: Permission denied
Warning in install.packages :
running command '"C:/Users/baasman/DOCUME~1/R/R-31~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\baasman\Documents\R\R-3.1.3\library" "randomForestSRC_1.6.0.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘randomForestSRC_1.6.0.tar.gz’ had non-zero exit status
pkgs V1
1 randomForestSRC 0

Can not install shinyTable successfully

I followed the instruction on the Github. It returned me an error like this:
install_github("shinyTable", "trestletech")
Downloading github repo trestletech/shinyTable#master
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached
In addition: Warning message:
Username parameter is deprecated. Please use trestletech/shinyTable
Then, I tried to download the repo zip file and installed the shinyTable from local zip file in R studio. After that, I library(shinyTable). It return me an error.
> install.packages("D:/UserData/xxxx/Downloads/shinyTable-master.zip", repos = NULL)
Installing package into ‘D:/UserData/xxxx/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
> library(shinyTable)
Error in library(shinyTable) : there is no package called ‘shinyTable’
This is sessionInfo() result:
R version 3.2.1 (2015-06-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] shinyRGL_0.1.0 devtools_1.8.0 rJava_0.9-7
loaded via a namespace (and not attached):
[1] rgl_0.95.1247 Rcpp_0.12.0 digest_0.6.8 mime_0.3 R6_2.1.0 xtable_1.7-4 git2r_0.10.1
[8] magrittr_1.5 httr_1.0.0 stringi_0.5-5 curl_0.9.2 xml2_0.1.1 tools_3.2.1 stringr_1.0.0
[15] shiny_0.12.2 httpuv_1.3.3 rversions_1.0.2 htmltools_0.2.6 tcltk_3.2.1 memoise_0.2.1
Does anyone know the reason and tell me how to install it? Thank you.
I had similar issues recently. Can you try this:
library(devtools)
install_git("https://github.com/trestletech/shinyTable")

Gain Package Installation error in R 3.1.2

I am trying to install the Gains package in R Studio Version 3.1.2 like this:
install.packages("gains")
The following warnings appear:
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.1
Warning in install.packages :package ‘gains’ is not available (for R version 3.1.2)
Does anyone know how can I fix this?
Thanks!
I believe that the problem lies in your corrupted, incomplete or otherwise incorrect R environment. I was able to install that package without any problems at all just by issuing the default command:
> install.packages("gains")
Installing package into ‘C:/Users/Alex/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/gains_1.1.zip'
Content type 'application/zip' length 35802 bytes (34 Kb)
opened URL
downloaded 34 Kb
package ‘gains’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Alex\AppData\Local\Temp\RtmpSSRths\downloaded_packages
> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
loaded via a namespace (and not attached):
[1] tools_3.1.1
As a quick solution to the problem, I suggest to specify CRAN mirror explicitly:
install.packages("gains", repos = "http://cran.rstudio.com")

Resources