I am trying to write an R package with Rcpp. Everything works well except for a warning emitted by R CMD check my_package
.
Status: 1 WARNING
checking for missing documentation entries ... WARNING
Undocumented code objects:
‘shiny_function’
All user-level objects in a package should have documentation entries.
Here shiny_function
is implemented in C++ and exported with an Rcpp attribute
// [[Rcpp::export]]
int shiny_function(int arg) {
return arg;
}
The problem is I want to "rename" it to shiny.function
when exporting to R, so in R/shiny_function.R
I have
shiny.function <- function(arg) {
.Call("_my_package_shiny_function", arg)
}
After getting this warning, I modified NAMESPACE
to have exportPattern("^[^_]+")
as an attempt to avoid exporting functions with underlines in their name, but the warning persists.
How do I "rename" an Rcpp function written in C++?