Closed yangj6688 closed 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.
Thanks a lot, the code works.
@remlapmot Thanks so much! That is great to know!
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'
)
)
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:
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
^log_likelihood_functions.cpp: In lambda function: log_likelihood_functions.cpp:104:37: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long long unsigned int'} and 'int' [-Wsign-compare] 104 | for(size_t j=0; j<K; j++){ | ~^~ log_likelihood_functions.cpp: In lambda function: log_likelihood_functions.cpp:193:37: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long long unsigned int'} and 'int' [-Wsign-compare] 193 | for(size_t j=0; j<L; j++){ | ~^~ log_likelihood_functions.cpp: In function 'double loglik_i_Z1(double, double, double, double, RcppParallel::RVector^log_likelihood_functions.cpp: In function 'double loglik_i_Z0(double, double, double, double, RcppParallel::RVector^log_likelihood_functions.cpp: In lambda function: log_likelihood_functions.cpp:331:37: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long long unsigned int'} and 'int' [-Wsign-compare] 331 | for(size_t j=0; j<L; j++){ | ~^~ log_likelihood_functions.cpp: In lambda function: log_likelihood_functions.cpp:380:37: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long long unsigned int'} and 'int' [-Wsign-compare] 380 | for(size_t j=0; j<L; j++){ | ~^~ g++ -shared -s -static-libgcc -o cause.dll tmp.def RcppExports.o log_likelihood_functions.o -LC:/Users/yang/AppData/Local/R/win-library/4.3/RcppParallel/lib/x64 -ltbb -ltbbmalloc -LC:/rtools43/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools43/x86_64-w64-mingw32.static.posix/lib -LC:/PROGRA~1/R/R-43~1.0/bin/x64 -lR C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: cannot find -ltbb: No such file or directory C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: cannot find -ltbbmalloc: No such file or directory collect2.exe: error: ld returned 1 exit status no DLL was created ERROR: compilation failed for package 'cause'So I can't install the package. Perhaps there is a quick fix?
Thanks, Yang