简体   繁体   English

如何安装 RStan?

[英]How can I install RStan?

I am having troubles installing RStan.我在安装 RStan 时遇到问题。 Anytime I try, my code returns False.每当我尝试时,我的代码都会返回 False。

install.packages("rstan")
pkgbuild::has_build_tools(debug = TRUE)
Scanning R CMD config CC...
cc_path:  
'' does not exist
Scanning path...
Scanning registry...
WARNING: Rtools is required to build R packages, but is not currently installed.

Please download and install Rtools custom from https://cran.r-project.org/bin/windows/Rtools/.
[1] FALSE

Once it gives me the WARNING message, it asks me if I want to install Rtools.一旦它给我警告消息,它就会询问我是否要安装 Rtools。 I click "Yes" and then it returns [1] FALSE.我单击“是”,然后它返回 [1] FALSE。 And Rtools is not installed.并且没有安装 Rtools。 Could someone advise please?有人可以建议吗?

Operating System: Windows 10操作系统:Windows 10

Interface Version: RStan.接口版本:RStan。

Compiler/Toolkit: g++编译器/工具包:g++

You'll need to install RTools on Windows (please check your R version and choose correct RTools version).您需要在Windows上安装 RTools(请检查您的 R 版本并选择正确的 RTools 版本)。

However, without RTools, probably the easiest way is to just run:但是,如果没有 RTools,可能最简单的方法就是运行:

install.packages("rstan", type = "binary", dependencies = TRUE, repos = "https://cloud.r-project.org")

(Binary version shouldn't require RTools nor any compiler.) (二进制版本不需要 RTools 或任何编译器。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM