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

formals expressed as R code. #36

Open
romainfrancois opened this issue Oct 10, 2014 · 1 comment
Open

formals expressed as R code. #36

romainfrancois opened this issue Oct 10, 2014 · 1 comment

Comments

@romainfrancois
Copy link
Contributor

This is somewhat related to RcppCore/Rcpp#190. The idea is to nest default inside C++ comments so that we can express them as R code rather than C++ defaults.

int foo( std::vector<int> x /*= c(1L, 2L) */ ){
    // .... whatever
}

The idea is that the parser recognize /*= and promote that to the formals of the generated R function.

@kevinushey is that something you would tackle since you know a bit more about the internals.

@romainfrancois
Copy link
Contributor Author

Alternatively, we could think of a way to propagate missingness of an argument instead of converting the default to R code, but I think this would lead to code explosion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant