Skip to content

I can't install rstanarm from Github #618

@vegetableAndy

Description

@vegetableAndy

Summary:

I want to install rstanarm from GitHub to use 'stan_surv' function.

Description:

I am trying to perform Bayesian survival analysis on my data, so I install rstanarm package by the following command:

install.packages("rstanarm")

But when I use "stan_surv" command, R reminded me that the function doesn't exist. As a result, I looked up information online to solve this problem. Then I learned that to use 'stan_surv', rstanarm package should be installed by:

install.packages("rstanarm", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))

I ran the command above in my Rstudio. However, I still can't use "stan_surv"function, and the same error occurred again. I was so confused that I kept on trying to solve the problem. Then I found that the same question have been asked before in GitHub, the man who answered the question said that you have to install rstanarm package from GitHub. So I installed the rstan package and C++ toolchain for rstanarm package from GitHub. I ran the cmmamds in RStudio and R from GitHub:

Sys.setenv(MAKEFLAGS = "-j2")
Sys.setenv("R_REMOTES_NO_ERRORS_FROM_WARNINGS" = "true")
remotes::install_github("stan-dev/rstanarm", INSTALL_opts = "--no-multiarch", force = TRUE)

But it occoured such errior:

Warning messages:
1: In utils::untar(tarfile, ...) :tar.exe -xf "C:\Users\DELL\AppData\Local\Temp\Rtmp8AiDYz\file394092e82.tar.gz" -C "C:/Users/DELL/AppData/Local/Temp/Rtmp8AiDYz/remotes394026fb3832"returned error code 1
2: In i.p(...) :
  installation of packageC:/Users/DELL/AppData/Local/Temp/Rtmp8AiDYz/file39405346e69/rstanarm_2.32.1.tar.gzhad non-zero exit status

Is there anyone encountered the same issue and solve such problem? Could you please help me? Appreaciate it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions