ScPoEcon / ScPoEconometrics

Undergraduate textbook for Econometrics with R
https://ScPoEcon.github.io/ScPoEconometrics/
Other
141 stars 68 forks source link

Unable to download ScPoEconometrics Package #109

Closed JulieAssaad closed 5 years ago

JulieAssaad commented 5 years ago

Hello, I uninstalled ScPoEconometrics package a long time ago and since then I am not able to reinstall it. So I wasn't able to use any of the following runTutorial/launchApp/AboutApp... I am working on windows and R version 3.5.2.

My input: if (!require("devtools")) install.packages("devtools") library(devtools) install_github(repo = "ScPoEcon/ScPoEconometrics")

What I get:

if (!require("devtools")) install.packages("devtools") Loading required package: devtools Error: package or namespace load failed for ‘devtools’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘processx’ Installing package into ‘C:/Users/lenovo/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/devtools_2.0.1.zip' Content type 'application/zip' length 384263 bytes (375 KB) downloaded 375 KB

package ‘devtools’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\lenovo\AppData\Local\Temp\RtmpgNSpeW\downloaded_packages

library("devtools") Error: package or namespace load failed for ‘devtools’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘processx’ install_github(repo = "ScPoEcon/ScPoEconometrics") Error in install_github(repo = "ScPoEcon/ScPoEconometrics") : could not find function "install_github" if (!require("devtools")) install.packages("devtools") Loading required package: devtools Error: package or namespace load failed for ‘devtools’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘processx’ Installing package into ‘C:/Users/lenovo/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/devtools_2.0.1.zip' Content type 'application/zip' length 384263 bytes (375 KB) downloaded 375 KB

package ‘devtools’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\lenovo\AppData\Local\Temp\RtmpgNSpeW\downloaded_packages

install_github(repo = "ScPoEcon/ScPoEconometrics") Error in install_github(repo = "ScPoEcon/ScPoEconometrics") : could not find function "install_github"

floswald commented 5 years ago

it seems you should have asked your teacher about that specific problem a long time ago, in that case. why did you not do that?

to solve this.

  1. show me the output of libPaths().
  2. open the R console (the R GUI, NOT RStudio!) and execute this command: install.packages("processx")
  3. if that worked, you should now be able to load devtools.
  4. if not, you must have missed a discussion on slack about this very problem and a suggested solution invovling a direct download from github (no devtools involved). here is the link to my post. https://scpoeconometrics.slack.com/archives/CFBPZL92N/p1548675399004600
JulieAssaad commented 5 years ago

I was able to successfully install devtools but not ScPoEconometrics Packages. I tried both methods (using devtools and using the link you shared) on both RStudio and R GUI. This is what I got.

library(devtools) download.file("https://github.com/ScPoEcon/ScPoEconometrics/archive/master.zip",dest="tmp.zip") # directly download our package trying URL 'https://github.com/ScPoEcon/ScPoEconometrics/archive/master.zip' Content type 'application/zip' length unknown downloaded 6.3 MB

unzip("tmp.zip") install("ScPoEconometrics-master") # install it! These packages have more recent versions available. Which would you like to update?

1: glue (1.3.0 -> 1.3.1 ) [CRAN] 2: gtable (0.2.0 -> 0.3.0 ) [CRAN] 3: highr (0.7 -> 0.8 ) [CRAN] 4: httpuv (1.4.5.1 -> 1.5.0 ) [CRAN] 5: knitr (1.21 -> 1.22 ) [CRAN] 6: lazyeval (0.2.1 -> 0.2.2 ) [CRAN] 7: openssl (1.2.2 -> 1.3 ) [CRAN] 8: purrr (0.3.0 -> 0.3.2 ) [CRAN] 9: R6 (2.3.0 -> 2.4.0 ) [CRAN] 10: Rcpp (1.0.0 -> 1.0.1 ) [CRAN] 11: RCurl (1.95-4.11 -> 1.95-4.12) [CRAN] 12: readxl (1.2.0 -> 1.3.1 ) [CRAN] 13: rlang (0.3.1 -> 0.3.3 ) [CRAN] 14: rmarkdown (1.11 -> 1.12 ) [CRAN] 15: rstudioapi (0.9.0 -> 0.10 ) [CRAN] 16: stringi (1.2.4 -> 1.4.3 ) [CRAN] 17: stringr (1.3.1 -> 1.4.0 ) [CRAN] 18: sys (2.1 -> 3.1 ) [CRAN] 19: tibble (2.0.1 -> 2.1.1 ) [CRAN] 20: tidyr (0.8.2 -> 0.8.3 ) [CRAN] 21: tinytex (0.10 -> 0.11 ) [CRAN] 22: tis (1.34 -> 1.37.1 ) [CRAN] 23: xfun (0.4 -> 0.5 ) [CRAN] 24: XML (3.98-1.16 -> 3.98-1.19) [CRAN] 25: zip (1.0.0 -> 2.0.1 ) [CRAN] 26: zoo (1.8-4 -> 1.8-5 ) [CRAN] 27: CRAN packages only 28: All
29: None
Enter one or more numbers separated by spaces, or an empty line to cancel 1: 28 fs (NA -> 1.2.7 ) [CRAN] glue (1.3.0 -> 1.3.1 ) [CRAN] gtable (0.2.0 -> 0.3.0 ) [CRAN] highr (0.7 -> 0.8 ) [CRAN] httpuv (1.4.5.1 -> 1.5.0 ) [CRAN] knitr (1.21 -> 1.22 ) [CRAN] lazyeval (0.2.1 -> 0.2.2 ) [CRAN] openssl (1.2.2 -> 1.3 ) [CRAN] purrr (0.3.0 -> 0.3.2 ) [CRAN] R6 (2.3.0 -> 2.4.0 ) [CRAN] Rcpp (1.0.0 -> 1.0.1 ) [CRAN] RCurl (1.95-4.11 -> 1.95-4.12) [CRAN] readxl (1.2.0 -> 1.3.1 ) [CRAN] rlang (0.3.1 -> 0.3.3 ) [CRAN] rmarkdown (1.11 -> 1.12 ) [CRAN] rstudioapi (0.9.0 -> 0.10 ) [CRAN] stringi (1.2.4 -> 1.4.3 ) [CRAN] stringr (1.3.1 -> 1.4.0 ) [CRAN] sys (2.1 -> 3.1 ) [CRAN] tibble (2.0.1 -> 2.1.1 ) [CRAN] tidyr (0.8.2 -> 0.8.3 ) [CRAN] tinytex (0.10 -> 0.11 ) [CRAN] tis (1.34 -> 1.37.1 ) [CRAN] xfun (0.4 -> 0.5 ) [CRAN] XML (3.98-1.16 -> 3.98-1.19) [CRAN] zip (1.0.0 -> 2.0.1 ) [CRAN] zoo (1.8-4 -> 1.8-5 ) [CRAN] Installing 27 packages: fs, glue, gtable, highr, httpuv, knitr, lazyeval, openssl, purrr, R6, Rcpp, RCurl, readxl, rlang, rmarkdown, rstudioapi, stringi, stringr, sys, tibble, tidyr, tinytex, tis, xfun, XML, zip, zoo Installing packages into ‘C:/Users/lenovo/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/fs_1.2.7.zip' Content type 'application/zip' length 971466 bytes (948 KB) downloaded 948 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/glue_1.3.1.zip' Content type 'application/zip' length 172503 bytes (168 KB) downloaded 168 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/gtable_0.3.0.zip' Content type 'application/zip' length 433038 bytes (422 KB) downloaded 422 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/highr_0.8.zip' Content type 'application/zip' length 48186 bytes (47 KB) downloaded 47 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/httpuv_1.5.0.zip' Content type 'application/zip' length 1484548 bytes (1.4 MB) downloaded 1.4 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/knitr_1.22.zip' Content type 'application/zip' length 1469956 bytes (1.4 MB) downloaded 1.4 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/lazyeval_0.2.2.zip' Content type 'application/zip' length 170820 bytes (166 KB) downloaded 166 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/openssl_1.3.zip' Content type 'application/zip' length 3969782 bytes (3.8 MB) downloaded 3.8 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/purrr_0.3.2.zip' Content type 'application/zip' length 417429 bytes (407 KB) downloaded 407 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/R6_2.4.0.zip' Content type 'application/zip' length 58349 bytes (56 KB) downloaded 56 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/Rcpp_1.0.1.zip' Content type 'application/zip' length 4509148 bytes (4.3 MB) downloaded 4.3 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/RCurl_1.95-4.12.zip' Content type 'application/zip' length 2968691 bytes (2.8 MB) downloaded 2.8 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/readxl_1.3.1.zip' Content type 'application/zip' length 1528998 bytes (1.5 MB) downloaded 1.5 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/rlang_0.3.3.zip' Content type 'application/zip' length 1083276 bytes (1.0 MB) downloaded 1.0 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/rmarkdown_1.12.zip' Content type 'application/zip' length 3564086 bytes (3.4 MB) downloaded 3.4 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/rstudioapi_0.10.zip' Content type 'application/zip' length 237203 bytes (231 KB) downloaded 231 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/stringi_1.4.3.zip' Content type 'application/zip' length 15289558 bytes (14.6 MB) downloaded 14.6 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/stringr_1.4.0.zip' Content type 'application/zip' length 214515 bytes (209 KB) downloaded 209 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/sys_3.1.zip' Content type 'application/zip' length 58662 bytes (57 KB) downloaded 57 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/tibble_2.1.1.zip' Content type 'application/zip' length 334747 bytes (326 KB) downloaded 326 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/tidyr_0.8.3.zip' Content type 'application/zip' length 953777 bytes (931 KB) downloaded 931 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/tinytex_0.11.zip' Content type 'application/zip' length 94298 bytes (92 KB) downloaded 92 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/tis_1.37.1.zip' Content type 'application/zip' length 657921 bytes (642 KB) downloaded 642 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/xfun_0.5.zip' Content type 'application/zip' length 167448 bytes (163 KB) downloaded 163 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/XML_3.98-1.19.zip' Content type 'application/zip' length 4600600 bytes (4.4 MB) downloaded 4.4 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/zip_2.0.1.zip' Content type 'application/zip' length 439038 bytes (428 KB) downloaded 428 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/zoo_1.8-5.zip' Content type 'application/zip' length 1097143 bytes (1.0 MB) downloaded 1.0 MB

package ‘fs’ successfully unpacked and MD5 sums checked Error: (converted from warning) cannot remove prior installation of package ‘fs’

library(ScPoEconometrics) Error in library(ScPoEconometrics) : there is no package called ‘ScPoEconometrics’

floswald commented 5 years ago

not sure where this fs dependency comes from. just try again?

library(devtools); install("ScPoEconometrics-master")

if not, you have to remove this fs thing with remove.packages("fs"). you should definitely consult your class teacher with those issues, its' very hard to solve at a distance.

JulieAssaad commented 5 years ago

Okay thank you. I will consult my teacher on this issue.