JuliaInterop / RCall.jl

Call R from Julia
Other
319 stars 59 forks source link

Allow for dispatching on the R functions #472

Closed ChrisRackauckas closed 1 year ago

ChrisRackauckas commented 1 year ago

In the current setup, RCall returns a closure in Julia, which means it's hard to know in Julia if something is a function from R. This makes it really hard to workaround things that are weird in R, like is seen in https://github.com/SciML/diffeqr/issues/39. This changes it to use a callable struct instead of a closure in order to allow for dispatching.

codecov[bot] commented 1 year ago

Codecov Report

Base: 75.57% // Head: 75.67% // Increases project coverage by +0.09% :tada:

Coverage data is based on head (61f7cb2) compared to base (7a4ae27). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #472 +/- ## ========================================== + Coverage 75.57% 75.67% +0.09% ========================================== Files 24 24 Lines 1638 1640 +2 ========================================== + Hits 1238 1241 +3 + Misses 400 399 -1 ``` | [Impacted Files](https://codecov.io/gh/JuliaInterop/RCall.jl/pull/472?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaInterop) | Coverage Δ | | |---|---|---| | [src/convert/base.jl](https://codecov.io/gh/JuliaInterop/RCall.jl/pull/472/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaInterop#diff-c3JjL2NvbnZlcnQvYmFzZS5qbA==) | `89.83% <100.00%> (+0.68%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaInterop). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaInterop)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.