stan-dev / stan-dev/rstanarm

I can't install rstanarm from Github

Open
#618 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
401
Forks
136
PR merge metrics
No merged PRs in 30d

Description

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 package‘C:/Users/DELL/AppData/Local/Temp/Rtmp8AiDYz/file39405346e69/rstanarm_2.32.1.tar.gz’had non-zero exit status

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported remotes::install_github("stan-dev/rstanarm", INSTALL_opts = "--no-multiarch", force = TRUE) command in R or RStudio on Windows and inspect the tar.exe warning. Done would require identifying why the rstanarm archive extraction fails and confirming that the package installs with stan_surv available.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.