We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent baa00a3 commit 49db392Copy full SHA for 49db392
R/subsetting.R
@@ -602,27 +602,18 @@ is_tight_sequence_at_end <- function(i_new, n) {
602
}
603
604
tbl_subassign_col <- function(x, j, value) {
605
- # Assertion
606
- stopifnot(!is.null(names(j)) || length(j) == 0)
607
-
608
is_data <- !vapply(value, is.null, NA)
609
nrow <- fast_nrow(x)
610
611
x <- unclass(x)
612
613
# Grow, assign new names
614
- new_pos <- (j > length(x))
615
- new <- which(new_pos)
616
617
- # Grow, assign new names
+ new <- which(j > length(x))
618
if (has_length(new)) {
619
length(x) <- max(j[new])
620
names(x)[ j[new] ] <- names2(j)[new]
621
622
623
- # This must work now
624
- names(x)[ j[!new_pos] ] <- names2(j)[!new_pos]
625
626
# Update
627
for (jj in which(is_data)) {
628
ji <- j[[jj]]
0 commit comments