Skip to content

Commit 669f6ad

Browse files
committed
vapply_1b
1 parent dd36cf7 commit 669f6ad

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

R/rowwiseDT.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ rowwiseDT = function(...) {
1313
nrows = length(body) %/% ncols
1414
if (length(body) != nrows * ncols)
1515
stopf("There are %d columns but the number of cells is %d, which is not an integer multiple of the columns", ncols, length(body))
16-
is_problematic = vapply(
16+
is_problematic = vapply_1b(
1717
body,
18-
function(v) !is.atomic(v) && !is.null(v) && typeof(v) != "list",
19-
FUN.VALUE = logical(1L)
18+
function(v) !(is.atomic(v) || is.null(v) || typeof(v) == "list")
2019
)
2120
if (any(is_problematic)) {
2221
first_problem_idx = which(is_problematic)[1L]

0 commit comments

Comments
 (0)