Reputation: 733
I'm looking for an R function that detects all the functions in an R package that have formal arguments that are not used in the body of the function. Does something like this exist?
Upvotes: 1
Views: 130
Reputation: 326
I think the checkUsagePackage("packagename", all=TRUE) in the codetools package should check this. It (among other things) tests "warnings about unused formal parameters". The devtools::check() function might automatically invoke checkUsagePackage().
Upvotes: 3