无法从 github 'susanathey/causalTree' 安装

问题描述 投票:0回答:1

我想安装 Susan Athey 的 github 上提供的包“causalTree”。 每当我尝试安装它时,我都会收到一条错误消息,因此该软件包未安装。

我在计算机中安装了 Rtools,从 RStudio 安装了“devtools”并尝试安装 causalTree 软件包,如下所示:

install.packages("devtools")
devtools::install_github("susanathey/causalTree")

之后我收到以下消息:

* installing *source* package 'causalTree' ...
** using staged installation
** libs
C:/rtools40/ucrt64/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-43~1.1/include" -DNDEBUG     -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c CT.c -o CT.o
/bin/sh: line 1: C:/rtools40/ucrt64/mingw_64/bin/gcc: No such file or directory
make: *** [C:/PROGRA~1/R/R-43~1.1/etc/x64/Makeconf:265: CT.o] Error 127
ERROR: compilation failed for package 'causalTree'
* removing 'C:/Users/Roberto/AppData/Local/R/win-library/4.3/causalTree'

我不知道这是否有帮助,但我看到了一些关于寻找“gcc”的注释:

Sys.which("gcc")
                                       gcc
"C:\\rtools43\\X86_64~1.POS\\bin\\gcc.exe"

我的R版本是4.3.1“Beagle Scouts”

有人知道如何正确安装这个软件包吗?

r rstudio devtools rtools
1个回答
0
投票

看看 htetree 包

© www.soinside.com 2019 - 2024. All rights reserved.