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

Allow user to suppress NA warning in count variables #115

Open
Tracked by #119
TimTaylor opened this issue May 16, 2024 · 0 comments
Open
Tracked by #119

Allow user to suppress NA warning in count variables #115

TimTaylor opened this issue May 16, 2024 · 0 comments

Comments

@TimTaylor
Copy link
Collaborator

As part of improvements for #113 we now warn if a count column contains NA values (and nudge users to handle these before calling incidence():

incidence2/R/incidence.R

Lines 368 to 375 in 88c1fb9

nas_present <- sapply(.subset(DT,counts), anyNA)
if (any(nas_present)) {
missing_names <- names(nas_present)[nas_present]
warnf(
"`%s` contains NA values. Consider imputing these and calling `incidence()` again.",
missing_names[1L]
)
}

We should provide arguments and options to suppress this if desired.

@TimTaylor TimTaylor mentioned this issue May 21, 2024
9 tasks
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

No branches or pull requests

1 participant