petrelharp / local_pca

Methods for examining PCA locally along the genome.
71 stars 13 forks source link

github repo not installing with devtools #26

Closed josieparis closed 3 years ago

josieparis commented 3 years ago

Hi guys!

I love lostruct - and I use it often! My computer died recently, so I'm reinstalling favourite packages, but I'm having a problem with the current tar release

I have the following versions of data.table and devtools: data.table_1.14.2 devtools_2.4.2

My error when installing lostruct is:

> devtools::install_github("petrelharp/local_pca/lostruct") Downloading GitHub repo petrelharp/local_pca@HEAD Error in utils::download.file(url, path, method = method, quiet = quiet, : download from 'https://api.github.com/repos/petrelharp/local_pca/tarball/HEAD' failed

Thanks! Josie

petrelharp commented 3 years ago

Aw, gee, thanks! Hm, let me see. I've just updated my R and my devtools, and it worked for me (see below):

> sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux bullseye/sid

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.13.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8      
 [8] LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] rstudioapi_0.13   magrittr_2.0.1    usethis_2.0.1     devtools_2.4.2    pkgload_1.2.2     R6_2.5.0          rlang_0.4.11      fastmap_1.0.1     tools_4.1.1       pkgbuild_1.2.0    sessioninfo_1.1.1
[12] cli_3.0.1         withr_2.4.2       ellipsis_0.3.2    remotes_2.4.1     rprojroot_1.3-2   lifecycle_1.0.0   crayon_1.4.1      processx_3.5.2    purrr_0.3.4       callr_3.7.0       fs_1.5.0         
[23] ps_1.3.4          testthat_3.0.4    curl_4.3          memoise_2.0.0     glue_1.4.2        cachem_1.0.6      compiler_4.1.1    desc_1.4.0        backports_1.1.10  prettyunits_1.1.1

> remove.packages("lostruct")
Removing package from ‘/home/peter/R’
(as ‘lib’ is unspecified)
> remove.packages("lostruct")
Removing package from ‘/home/peter/R’
(as ‘lib’ is unspecified)
Error in find.package(pkgs, lib) : there is no package called ‘lostruct’
> devtools::install_github("petrelharp/local_pca/lostruct")
Downloading GitHub repo petrelharp/local_pca@HEAD
✔  checking for file ‘/tmp/RtmpGGEn9m/remotes22d502d0ac796/petrelharp-local_pca-1da2a08/lostruct/DESCRIPTION’ ...
─  preparing ‘lostruct’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts (446ms)
─  checking for empty or unneeded directories
   Omitted ‘LazyData’ from DESCRIPTION
─  building ‘lostruct_0.0.0.9000.tar.gz’

Installing package into ‘/home/peter/R’
(as ‘lib’ is unspecified)
* installing *source* package ‘lostruct’ ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (lostruct)

It says the download failed - maybe your internet went out? If it happens again, doing traceback() afterwards might give us more information about where the error occurred?

josieparis commented 3 years ago

Hi Peter,

Thanks for getting back to me so quickly, and sorry for my rubbishly-tardy response ...

I tried again on a hotspot, and indeed it was a consistently crappy internet connection (camped out in the mountains!)

Thanks (and apologies for such a menial Q). Phew, back on

Josie