Skip to content

Commit 49db392

Browse files
committed
Remove assertions
1 parent baa00a3 commit 49db392

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

R/subsetting.R

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -602,27 +602,18 @@ is_tight_sequence_at_end <- function(i_new, n) {
602602
}
603603

604604
tbl_subassign_col <- function(x, j, value) {
605-
# Assertion
606-
stopifnot(!is.null(names(j)) || length(j) == 0)
607-
608605
is_data <- !vapply(value, is.null, NA)
609606
nrow <- fast_nrow(x)
610607

611608
x <- unclass(x)
612609

613610
# Grow, assign new names
614-
new_pos <- (j > length(x))
615-
new <- which(new_pos)
616-
617-
# Grow, assign new names
611+
new <- which(j > length(x))
618612
if (has_length(new)) {
619613
length(x) <- max(j[new])
620614
names(x)[ j[new] ] <- names2(j)[new]
621615
}
622616

623-
# This must work now
624-
names(x)[ j[!new_pos] ] <- names2(j)[!new_pos]
625-
626617
# Update
627618
for (jj in which(is_data)) {
628619
ji <- j[[jj]]

0 commit comments

Comments
 (0)