[英]Unable to run packages from GitHub in R using devtools
Every time I try to download a package from GitHub using devtools I get an error.每次我尝试使用devtools从 GitHub 下载包时,我都会收到错误消息。 I'm currently trying to open the
elan
package:我目前正在尝试打开
elan
包:
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.
将包安装到“C:/Users/Daniel & Catherine/Documents/R/win-library/3.6”(因为“lib”未指定)错误:未指定包系统找不到指定的路径。 Error: Failed to install 'elan' from GitHub: (converted from warning) installation of package
错误:无法从 GitHub 安装“elan”:(从警告转换)安装包
'C:/rtemp/Rtmp0gabkG/file5580567f6ac9/elan_0.1.tar.gz' had non-zero exit status'C:/rtemp/Rtmp0gabkG/file5580567f6ac9/elan_0.1.tar.gz' 有非零退出状态
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 devtools ).
我知道路径名中的空格可能有问题,但我对此无能为力(我不想在我的计算机上设置新用户只是为了运行devtools )。
My SessionInfo()
is:我的
SessionInfo()
是:
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
Looking at the source code at https://github.com/dalejbarr/elan/blob/master/DESCRIPTION I found a potential error of format.查看https://github.com/dalejbarr/elan/blob/master/DESCRIPTION上的源代码,我发现了一个潜在的格式错误。 You could try to clone the repository and debug it manually by removing the extra spaces in front on the
XML
package import :您可以尝试通过删除
XML
包导入前面的额外空格来克隆存储库并手动调试它:
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.或者,您可以使用
XML
(这个小包使用的)或xml2
(如此处)包来解析您的 XML 文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.