1

Every time I try to download a package from GitHub using I get an error. I'm currently trying to open the elan package:

 library(devtools)
 devtools::install_github("dalejbarr/elan")

I get the following error:

Installing package into ‘C:/Users/Daniel & Catherine/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified) Error: no packages specified The system cannot find the path specified. Error: Failed to install 'elan' from GitHub: (converted from warning) installation of package
‘C:/rtemp/Rtmp0gabkG/file5580567f6ac9/elan_0.1.tar.gz’ had non-zero exit status

I've tried the solutions suggested here and here, but neither fix the problem. I understand that there might be a problem with the spaces in the path name, but there's not much I can do about that (I don't want to set up a new user on my computer just to run ).

My SessionInfo() is:

 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 Kingdom.1252  LC_CTYPE=English_United Kingdom.1252    LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                                 LC_TIME=English_United Kingdom.1252    

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

 other attached packages:
 [1] devtools_2.2.2 usethis_1.5.1 

 loaded via a namespace (and not attached):
  [1] Rcpp_1.0.2        rstudioapi_0.10   magrittr_1.5      pkgload_1.0.2     R6_2.4.0          rlang_0.4.0       tools_3.6.1       pkgbuild_1.0.3         sessioninfo_1.1.1 cli_1.1.0         withr_2.1.2       ellipsis_0.3.0   
 [13] remotes_2.1.1     assertthat_0.2.1  digest_0.6.21     rprojroot_1.3-2   crayon_1.3.4      processx_3.4.0    callr_3.3.0       fs_1.3.1          ps_1.3.0          curl_3.3          testthat_2.2.1    memoise_1.1.0    
 [25] glue_1.3.1        compiler_3.6.1    desc_1.2.0        backports_1.1.5   prettyunits_1.0.2
Catherine Laing
  • 475
  • 6
  • 18
  • Workaround: Download the zipfile and install in via `install.packages("pathtoZIPfile.zip", repos=NULL)`. I think the main problem really is the username – J_F Mar 17 '20 at 13:00
  • That gives me the message `Installing package into ‘C:/Users/Daniel & Catherine/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified)`, and then when I try to run the package with `library()` it says there is no package called elan. – Catherine Laing Mar 17 '20 at 13:04
  • Please also add your `sessionInfo()`, it fails to install for me (R version 3.6.2), too, looks like my dplyr version is too old. `"package 'dplyr' was built under R version 3.6.3"` – zx8754 Mar 17 '20 at 13:14
  • https://community.rstudio.com/t/spaces-in-library-path-names-on-windows-causes-problems-installing-packages-after-installing-r-3-5-0/8978/4 Install the packages and R in C:/R – J_F Mar 17 '20 at 13:14

1 Answers1

1

Looking at the source code at https://github.com/dalejbarr/elan/blob/master/DESCRIPTION I found a potential error of format. You could try to clone the repository and debug it manually by removing the extra spaces in front on the XML package import :

DESCRIPTION file

Package: elan
Title: Read ELAN XML files
Version: 0.1
Authors@R: "Dale Barr <dalejbarr3@gmail.com> [aut, cre]"
Description: Read ELAN XML files to tidy output
Depends:
    R (>= 3.1.1),
    dplyr
Imports:
      XML,
    plyr
License: 
LazyData: true
RoxygenNote: 7.0.2

I tried it in a minimal package and this raise a problem (but the package still compiles without the scripts).

Alternatively you could use the XML(which this small package uses) or the xml2 (as here) package to parse your XML files.

cbo
  • 1,664
  • 1
  • 12
  • 27
  • I can run the cloned script this way, but when I try to actually use the elan package it won't work. I think the problem has more to do with `devtools` than this package specifically. – Catherine Laing Mar 17 '20 at 16:24
  • This is not obvious : `devtools` is a robust well established package and this package seems nice but it is a small 2015 github contribution (no CRAN) and there is at least a problem in the source. Thus, if it is was me, I would look for problem into to the `elan` package or use `xml2` instead. – cbo Mar 17 '20 at 17:43