Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling r functions in extension packages #238

Merged
merged 9 commits into from
Jul 28, 2021

Conversation

andy-thomason
Copy link
Contributor

Allow more flexible expressions in call! macros and update the Function
wrapper to accept primitives.

Copy link
Member

@clauswilke clauswilke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good to me. I had a few minor comments and questions, see specific comments.

extendr-api/tests/call_tests.rs Outdated Show resolved Hide resolved
extendr-macros/src/lib.rs Outdated Show resolved Hide resolved
extendr-macros/src/call.rs Show resolved Hide resolved
extendr-macros/src/lib.rs Outdated Show resolved Hide resolved
@andy-thomason
Copy link
Contributor Author

There are many ways we can optimise here when the time comes.

We could even generate stubs for R libraries at compile time with something like:

mod base {
   include_R_namespace!("base");
}

mod stats {
   include_R_namespace!("stats");
}


...

base::sum(...);
rstats::dbeta(...);

Copy link
Member

@clauswilke clauswilke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks! Just saw one more minor typo.

extendr-macros/src/call.rs Outdated Show resolved Hide resolved
@andy-thomason
Copy link
Contributor Author

If there are no objections, I'll merge.

@clauswilke
Copy link
Member

Yes, go ahead.

@andy-thomason andy-thomason merged commit 42d168b into master Jul 28, 2021
@CGMossa CGMossa deleted the calling-R-functions-in-extension-packages branch April 30, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants