Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't install rstanarm from Github #618

Open
vegetableAndy opened this issue Apr 2, 2024 · 0 comments
Open

I can't install rstanarm from Github #618

vegetableAndy opened this issue Apr 2, 2024 · 0 comments

Comments

@vegetableAndy
Copy link

vegetableAndy commented Apr 2, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant