-
Notifications
You must be signed in to change notification settings - Fork 114
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
Error in aggregate.data.frame #57
Comments
Not at the computer so I can't verify, but I believe function coverage takes the function definition, not the function name. Remove the quotes in your example and it should work. |
Tried that
|
This is a bug related to #24. Because the function has no filename You can fix the example by pre-pending a filename to the names attribute of the returned coverage. ff = function(x) identity(x)
cov <- function_coverage("ff", ff(1))
names(cov) <- paste0("<file>", names(cov))
cov
# Package Coverage: 100.00%
# <file>: 100.00%
as.data.frame(cov)
# filename first_line first_byte last_line last_byte first_column last_column first_parsed last_parsed value
# 1 <file> 1 6 1 28 6 28 1 1 1 That being said this is a bug. Additionally reporting "Package Coverage" from the print method when printing function coverage also makes no sense, we should probably change that to "Overall Coverage" to be more general. |
Should be fixed with the new srcref based counting. |
This might very well be operator error, but ...
Results in
What am I missing? Thanks
The text was updated successfully, but these errors were encountered: