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

Encapsulate dealing with "all missings" into a function #222

Open
hfrick opened this issue Oct 5, 2022 · 0 comments
Open

Encapsulate dealing with "all missings" into a function #222

hfrick opened this issue Oct 5, 2022 · 0 comments
Labels
upkeep maintenance, infrastructure, and similar

Comments

@hfrick
Copy link
Member

hfrick commented Oct 5, 2022

The pattern to check if all the observations in new_data have missing values and (if necessary) return an NA-filled tibble early should probably be its own function.

Example:

all_missing <- n_missing == n_total
if (all_missing) {
ret <- predict_survival_na(time, interval)
ret <- tibble(.pred = rep(list(ret), n_missing))
return(ret)
}

@hfrick hfrick added the upkeep maintenance, infrastructure, and similar label Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upkeep maintenance, infrastructure, and similar
Projects
None yet
Development

No branches or pull requests

1 participant