Comments (6)
Agreed! I just had a similar experience struggling to figure out how to use RCall in the automatic testing environment with github actions (locally, testing run smoothly). Considering that one huge use case of RCall is to compare the results of your Julia implementation with the results from a given R package, it would be extremely helpful to have it documented how to set up the automatic testing environment so that RCall works.
from rcall.jl.
I'm not opposed to adding some tips to the docs in a section titled something like "Using RCall in CI". Two other places to look for examples:
from rcall.jl.
@evangorstein could you share your setup ? Mine is unfortunately still in private repo but will be released soon
from rcall.jl.
I ended up copy-pasting from the workflow for MonotoneSplines.jl
that you linked to. That is, I included the following in my workflow file
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r-version }}
# actually it seems that without installing `libcurl4-openssl-dev`, there also exists a libcurl.so, but at `/lib/x86_64-linux-gnu/libcurl.so.4` instead of `/usr/lib/x86_64-linux-gnu/libcurl.so.4`
# for consistency with previous setting and also recommended at https://github.com/r-lib/actions/tree/v2/setup-r-dependencies, continue to install `libcurl4-openssl-dev`
- name: Install libcurl on Linux
if: runner.os == 'Linux'
run: sudo apt-get update -y && sudo apt-get install -y libcurl4-openssl-dev
- name: Install Dependencies for R
run: |
r = getOption("repos")
r["CRAN"] = "https://cloud.r-project.org/"
options(repos=r)
install.packages("some_package")
shell: sudo Rscript {0}
and then later
- uses: julia-actions/julia-runtest@v1
env:
LD_PRELOAD: /usr/lib/x86_64-linux-gnu/libcurl.so.4
LD_LIBRARY_PATH: /opt/R/${{ matrix.r-version }}/lib/R/lib
I'm not sure whether all of this is necessary, but I included it all just in case.
from rcall.jl.
Just to give a small status update since this is runing on a private repo EDIT: not anymore got published, the file is there. The way of setting R packages that i used (the r-lib/actions/setup-r-dependencies@v2
action) gives automatic caching of them from a run to the next and is the actual recomended way of doing this.
However I still struggle to get it stable : it installs the last version of every R package each times, which is known to be buggy, and in 3 weeks I had to upload the R version twice from 4.1 to 4.3 to 4.4.0 now... Maybe there is something that could be done to freeze package versions with R::renv
but I was not able to make it work.
from rcall.jl.
I also recently struggled with this, mostly to make Julia RCall find the path to R under macos-latest
. It worked with this setup.
from rcall.jl.
Related Issues (20)
- why building RCall.jl failed during the registration of an package HOT 2
- RCall.jl failed to build with Conda (23.3.1) HOT 3
- "is.na() applied to non-(list or vector) of type 'language'" when passing a Julia's boolean variable to R's smooth.spline HOT 2
- Unable to Pkg.build RCall HOT 4
- Find the number of arguments for an RFunction? HOT 1
- loading RCall in atreplinit fails because of RPrompt HOT 1
- Error: attempt to apply non-function HOT 5
- [BUG] ArgumentError: malformed expression in formula HOT 3
- If julia functions which was brought to R throws an error, no real error is thrown, but an error object is returned #216 HOT 3
- Feature Request: Add possibility to build RCall without having R_HOME set HOT 3
- ERROR: UndefVarError: `val` not defined
- Segmentation fault on closing julia HOT 7
- equal `==` is not working on `reval` HOT 2
- Feature Request: Make RCall depend dynamically on `R_HOME` HOT 9
- Feature Request: show/display methods for R plots like ggplot2 HOT 3
- ERROR: REvalError: Loading required package: mvtnorm HOT 1
- Difficulty installing RCall on a low version of julia HOT 6
- Incorrect julia compat HOT 3
- Add support for TimeZones
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rcall.jl.