jean997 / cause

R package for CAUSE
https://jean997.github.io/cause/
52 stars 15 forks source link

install "cause" error #42

Closed yangj6688 closed 11 months ago

yangj6688 commented 11 months ago

Hi!

This package looks really useful and I want download it. but I run into an error that may be specific to v.4.3 of Rtool. Nomatter version 1.0 or 1.2, the warning message is same. Nomatter package was installed online or locally, it seems that the problem lies in a mismatch with RTool4.3. Below are warning information:

devtools::install_local("cause-master.zip") These packages have more recent versions available. It is recommended to update all of them. Which would you like to update?

1: All
2: CRAN packages only
3: None
4: vctrs (0.6.2 -> 0.6.3 ) [CRAN] 5: Rcpp (1.0.10 -> 1.0.11) [CRAN] 6: purrr (1.0.1 -> 1.0.2 ) [CRAN] 7: ashr (2.2-32 -> 2.2-63) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 3

So I can't install the package. Perhaps there is a quick fix?

Thanks, Yang

remlapmot commented 11 months ago

@jean997 - as a peripheral part of MR Methods Network I have been including some of the MR related packages which are on GitHub but not on CRAN in the MRCIEU R-universe because this provides a quick solution to questions like these. Last night I included cause, so there are now binaries for Windows and Intel (and in fact Ubuntu Jammy Jellyfish) available.

The installation code for Windows and Intel Mac users is (so @yangj6688 you can run this and you won't need to do any compilation).

install.packages('cause', repos = c('https://mrcieu.r-universe.dev', 'https://cloud.r-project.org'))

Jean - note because you have a package on CRAN you already have an R-universe which is https://jean997.r-universe.dev/builds, which it's easy to add to - see the setup instructions.

yangj6688 commented 11 months ago

Thanks a lot, the code works.

jean997 commented 11 months ago

@remlapmot Thanks so much! That is great to know!

remlapmot commented 11 months ago

My pleasure Jean. In case helpful, the installation instructions for Ubuntu Jammy Jellyfish require a slightly different URL in the repos option, as follows (note if running R in the Terminal then the HTTPUserAgent option needs amending).

# Installation code for Ubuntu Jammy Jellyfish users using R in RStudio Desktop or RStudio Server
install.packages(
  'cause',
  repos = c(
    'https://mrcieu.r-universe.dev/bin/linux/jammy/4.3/',
    'https://packagemanager.posit.co/cran/__linux__/jammy/latest',
    'https://cloud.r-project.org'
  )
)
# Installation code for Ubuntu Jammy Jellyfish users running R in the Terminal
options(HTTPUserAgent = sprintf(
  "R/%s R (%s)",
  getRversion(),
  paste(getRversion(),
        R.version["platform"],
        R.version["arch"],
        R.version["os"])
))

install.packages(
  'cause',
  repos = c(
    'https://mrcieu.r-universe.dev/bin/linux/jammy/4.3/',
    'https://packagemanager.posit.co/cran/__linux__/jammy/latest',
    'https://cloud.r-project.org'
  )
)