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

Extend validate_has_data to accept vector input #962

Merged
merged 10 commits into from
Nov 20, 2023
1 change: 1 addition & 0 deletions R/validations.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ validate_has_data <- function(x,
stopifnot(
"Please provide a character vector in msg argument of validate_has_data." = is.character(msg) || is.null(msg)
)
vedhav marked this conversation as resolved.
Show resolved Hide resolved
checkmate::assert_data_frame(x)
validate(need(!is.null(x) && is.data.frame(x), "No data left."))
vedhav marked this conversation as resolved.
Show resolved Hide resolved
if (!is.null(min_nrow)) {
if (complete) {
Expand Down