Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Oct 10, 2024
1 parent 867e237 commit 0e4e256
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/row_count.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ row_count <- function(data,
# because the latter sometimes returns unsuitable classes/types. compare
# typeof(as.Date("2020-01-01")), which returns "double".
count_type <- class(count)[1]
valid_columns <- vapply(data, function(i) identical(class(i)[1], count_type), TRUE)
valid_columns <- vapply(data, inherits, TRUE, what = count_type)
# check if any columns left?
if (!any(valid_columns)) {
insight::format_error("No column has same type as the value provided in `count`. Set `allow_coercion = TRUE` or specify a valid value for `count`.") # nolint
Expand Down

0 comments on commit 0e4e256

Please sign in to comment.