@@ -331,7 +331,8 @@ tbl[[1:2]]
331
331
332
332
``` r
333
333
df [[c(" n" , " c" )]]
334
- # > Error in .subset2(x, i, exact = exact): subscript out of bounds
334
+ # > Error in `.subset2()`:
335
+ # > ! subscript out of bounds
335
336
```
336
337
337
338
</td ><td >
@@ -363,7 +364,8 @@ tbl[[TRUE]]
363
364
364
365
``` r
365
366
df [[mean ]]
366
- # > Error in .subset2(x, i, exact = exact): invalid subscript type 'closure'
367
+ # > Error in `.subset2()`:
368
+ # > ! invalid subscript type 'closure'
367
369
```
368
370
369
371
</td ><td >
@@ -431,7 +433,8 @@ tbl[[NA_integer_]]
431
433
432
434
``` r
433
435
df [[- 1 ]]
434
- # > Error in .subset2(x, i, exact = exact): invalid negative subscript in get1index <real>
436
+ # > Error in `.subset2()`:
437
+ # > ! invalid negative subscript in get1index <real>
435
438
```
436
439
437
440
</td ><td >
@@ -447,7 +450,8 @@ tbl[[-1]]
447
450
448
451
``` r
449
452
df [[4 ]]
450
- # > Error in .subset2(x, i, exact = exact): subscript out of bounds
453
+ # > Error in `.subset2()`:
454
+ # > ! subscript out of bounds
451
455
```
452
456
453
457
</td ><td >
@@ -982,7 +986,8 @@ For compatibility, `i` can also be a character vector containing positive number
982
986
983
987
``` r
984
988
df [mean , ]
985
- # > Error in xj[i]: invalid subscript type 'closure'
989
+ # > Error in `xj[i]`:
990
+ # > ! invalid subscript type 'closure'
986
991
```
987
992
988
993
</td ><td >
@@ -998,7 +1003,8 @@ tbl[mean, ]
998
1003
999
1004
``` r
1000
1005
df [list (1 ), ]
1001
- # > Error in xj[i]: invalid subscript type 'list'
1006
+ # > Error in `xj[i]`:
1007
+ # > ! invalid subscript type 'list'
1002
1008
```
1003
1009
1004
1010
</td ><td >
@@ -1473,7 +1479,8 @@ with_tbl(tbl[[TRUE]] <- 0)
1473
1479
1474
1480
``` r
1475
1481
with_df(df [[1 : 3 ]] <- 0 )
1476
- # > Error in `[[<-`(`*tmp*`, i, value = value): recursive indexing failed at level 2
1482
+ # > Error in `[[<-`:
1483
+ # > ! recursive indexing failed at level 2
1477
1484
```
1478
1485
1479
1486
</td ><td >
@@ -1489,7 +1496,8 @@ with_tbl(tbl[[1:3]] <- 0)
1489
1496
1490
1497
``` r
1491
1498
with_df(df [[c(" n" , " c" )]] <- 0 )
1492
- # > Error in x[[i]] <- value: more elements supplied than there are to replace
1499
+ # > Error in `x[[i]] <- value`:
1500
+ # > ! more elements supplied than there are to replace
1493
1501
```
1494
1502
1495
1503
</td ><td >
@@ -1505,7 +1513,8 @@ with_tbl(tbl[[c("n", "c")]] <- 0)
1505
1513
1506
1514
``` r
1507
1515
with_df(df [[FALSE ]] <- 0 )
1508
- # > Error in x[[i]] <- value: attempt to select less than one element in integerOneIndex
1516
+ # > Error in `x[[i]] <- value`:
1517
+ # > ! attempt to select less than one element in integerOneIndex
1509
1518
```
1510
1519
1511
1520
</td ><td >
@@ -1521,7 +1530,8 @@ with_tbl(tbl[[FALSE]] <- 0)
1521
1530
1522
1531
``` r
1523
1532
with_df(df [[1 : 2 ]] <- 0 )
1524
- # > Error in x[[i]] <- value: more elements supplied than there are to replace
1533
+ # > Error in `x[[i]] <- value`:
1534
+ # > ! more elements supplied than there are to replace
1525
1535
```
1526
1536
1527
1537
</td ><td >
@@ -1537,7 +1547,8 @@ with_tbl(tbl[[1:2]] <- 0)
1537
1547
1538
1548
``` r
1539
1549
with_df(df [[NA_integer_ ]] <- 0 )
1540
- # > Error in x[[i]] <- value: attempt to select more than one element in integerOneIndex
1550
+ # > Error in `x[[i]] <- value`:
1551
+ # > ! attempt to select more than one element in integerOneIndex
1541
1552
```
1542
1553
1543
1554
</td ><td >
@@ -1553,7 +1564,8 @@ with_tbl(tbl[[NA_integer_]] <- 0)
1553
1564
1554
1565
``` r
1555
1566
with_df(df [[NA ]] <- 0 )
1556
- # > Error in x[[i]] <- value: attempt to select more than one element in integerOneIndex
1567
+ # > Error in `x[[i]] <- value`:
1568
+ # > ! attempt to select more than one element in integerOneIndex
1557
1569
```
1558
1570
1559
1571
</td ><td >
@@ -1569,7 +1581,8 @@ with_tbl(tbl[[NA]] <- 0)
1569
1581
1570
1582
``` r
1571
1583
with_df(df [[NA_character_ ]] <- 0 )
1572
- # > Error in if (names(x)[nc] == "") names(x)[nc] <- paste0("V", nc): missing value where TRUE/FALSE needed
1584
+ # > Error in `if (names(x)[nc] == "") ...`:
1585
+ # > ! missing value where TRUE/FALSE needed
1573
1586
```
1574
1587
1575
1588
</td ><td >
@@ -1615,7 +1628,8 @@ with_tbl(tbl[["li"]] <- list(0))
1615
1628
1616
1629
``` r
1617
1630
with_df2(df2 [[" tb" ]] <- df [1 , ])
1618
- # > Error in `[[<-.data.frame`(`*tmp*`, "tb", value = structure(list(n = 1L, : replacement has 1 row, data has 4
1631
+ # > Error in `[[<-.data.frame`:
1632
+ # > ! replacement has 1 row, data has 4
1619
1633
```
1620
1634
1621
1635
</td ><td >
@@ -1636,7 +1650,8 @@ with_tbl2(tbl2[["tb"]] <- tbl[1, ])
1636
1650
1637
1651
``` r
1638
1652
with_df2(df2 [[" m" ]] <- df2 [[" m" ]][1 , , drop = FALSE ])
1639
- # > Error in `[[<-.data.frame`(`*tmp*`, "m", value = structure(c(1, 0, 0, : replacement has 1 row, data has 4
1653
+ # > Error in `[[<-.data.frame`:
1654
+ # > ! replacement has 1 row, data has 4
1640
1655
```
1641
1656
1642
1657
</td ><td >
@@ -1707,7 +1722,8 @@ with_tbl(tbl[[1]] <- 4:1)
1707
1722
1708
1723
``` r
1709
1724
with_df(df [[1 ]] <- 3 : 1 )
1710
- # > Error in `[[<-.data.frame`(`*tmp*`, 1, value = 3:1): replacement has 3 rows, data has 4
1725
+ # > Error in `[[<-.data.frame`:
1726
+ # > ! replacement has 3 rows, data has 4
1711
1727
```
1712
1728
1713
1729
</td ><td >
@@ -2309,7 +2325,8 @@ An attempt to update the same column twice gives an error.
2309
2325
2310
2326
``` r
2311
2327
with_df(df [c(1 , 1 )] <- list (1 , 2 ))
2312
- # > Error in `[<-.data.frame`(`*tmp*`, c(1, 1), value = list(1, 2)): duplicate subscripts for columns
2328
+ # > Error in `[<-.data.frame`:
2329
+ # > ! duplicate subscripts for columns
2313
2330
```
2314
2331
2315
2332
</td ><td >
@@ -2356,7 +2373,8 @@ with_tbl(tbl[1:2] <- list(NULL, 4:1))
2356
2373
2357
2374
``` r
2358
2375
with_df(df [NA ] <- list (" x" ))
2359
- # > Error in `[<-.data.frame`(`*tmp*`, NA, value = list("x")): missing values are not allowed in subscripted assignments of data frames
2376
+ # > Error in `[<-.data.frame`:
2377
+ # > ! missing values are not allowed in subscripted assignments of data frames
2360
2378
```
2361
2379
2362
2380
</td ><td >
@@ -2373,7 +2391,8 @@ with_tbl(tbl[NA] <- list("x"))
2373
2391
2374
2392
``` r
2375
2393
with_df(df [NA_integer_ ] <- list (" x" ))
2376
- # > Error in `[<-.data.frame`(`*tmp*`, NA_integer_, value = list("x")): missing values are not allowed in subscripted assignments of data frames
2394
+ # > Error in `[<-.data.frame`:
2395
+ # > ! missing values are not allowed in subscripted assignments of data frames
2377
2396
```
2378
2397
2379
2398
</td ><td >
@@ -2388,7 +2407,8 @@ with_tbl(tbl[NA_integer_] <- list("x"))
2388
2407
2389
2408
``` r
2390
2409
with_df(df [NA_character_ ] <- list (" x" ))
2391
- # > Error in `[<-.data.frame`(`*tmp*`, NA_character_, value = list("x")): missing values are not allowed in subscripted assignments of data frames
2410
+ # > Error in `[<-.data.frame`:
2411
+ # > ! missing values are not allowed in subscripted assignments of data frames
2392
2412
```
2393
2413
2394
2414
</td ><td >
@@ -2610,7 +2630,8 @@ with_tbl(tbl[4] <- list(4:1))
2610
2630
2611
2631
``` r
2612
2632
with_df(df [5 ] <- list (4 : 1 ))
2613
- # > Error in `[<-.data.frame`(`*tmp*`, 5, value = list(4:1)): new columns would leave holes after existing columns
2633
+ # > Error in `[<-.data.frame`:
2634
+ # > ! new columns would leave holes after existing columns
2614
2635
```
2615
2636
2616
2637
</td ><td >
@@ -3004,7 +3025,8 @@ with_tbl(tbl[, 2:3] <- NULL)
3004
3025
3005
3026
``` r
3006
3027
with_df(df [1 , 2 : 3 ] <- NULL )
3007
- # > Error in x[[jj]][iseq] <- vjj: replacement has length zero
3028
+ # > Error in `x[[jj]][iseq] <- vjj`:
3029
+ # > ! replacement has length zero
3008
3030
```
3009
3031
3010
3032
</td ><td >
@@ -3027,7 +3049,8 @@ See `?vec_is` and `?vec_proxy` for details.
3027
3049
3028
3050
``` r
3029
3051
with_df(df [1 ] <- mean )
3030
- # > Error in rep(value, length.out = n): attempt to replicate an object of type 'closure'
3052
+ # > Error in `rep()`:
3053
+ # > ! attempt to replicate an object of type 'closure'
3031
3054
```
3032
3055
3033
3056
</td ><td >
@@ -3066,7 +3089,8 @@ with_df(df[1] <- lm(mpg ~ wt, data = mtcars))
3066
3089
# > c(`(Intercept)` = 37.285126167342,
3067
3090
# > : replacement element 7 has 5 rows
3068
3091
# > to replace 4 rows
3069
- # > Error in `[<-.data.frame`(`*tmp*`, 1, value = structure(list(coefficients = c(`(Intercept)` = 37.285126167342, : replacement element 10 has 3 rows, need 4
3092
+ # > Error in `[<-.data.frame`:
3093
+ # > ! replacement element 10 has 3 rows, need 4
3070
3094
```
3071
3095
3072
3096
</td ><td >
@@ -3207,7 +3231,8 @@ with_tbl(tbl[-2, ] <- tbl[1, ])
3207
3231
3208
3232
``` r
3209
3233
with_df(df [- 1 : 2 , ] <- df [1 , ])
3210
- # > Error in seq_len(nrows)[i]: only 0's may be mixed with negative subscripts
3234
+ # > Error in `seq_len(nrows)[i]`:
3235
+ # > ! only 0's may be mixed with negative subscripts
3211
3236
```
3212
3237
3213
3238
</td ><td >
@@ -3224,7 +3249,8 @@ with_tbl(tbl[-1:2, ] <- tbl[1, ])
3224
3249
3225
3250
``` r
3226
3251
with_df(df [NA_integer_ , ] <- df [1 , ])
3227
- # > Error in `[<-.data.frame`(`*tmp*`, NA_integer_, , value = structure(list(: missing values are not allowed in subscripted assignments of data frames
3252
+ # > Error in `[<-.data.frame`:
3253
+ # > ! missing values are not allowed in subscripted assignments of data frames
3228
3254
```
3229
3255
3230
3256
</td ><td >
@@ -3241,7 +3267,8 @@ with_tbl(tbl[NA_integer_, ] <- tbl[1, ])
3241
3267
3242
3268
``` r
3243
3269
with_df2(df2 [NA_integer_ , ] <- df2 [1 , ])
3244
- # > Error in `[<-.data.frame`(`*tmp*`, NA_integer_, , value = structure(list(: missing values are not allowed in subscripted assignments of data frames
3270
+ # > Error in `[<-.data.frame`:
3271
+ # > ! missing values are not allowed in subscripted assignments of data frames
3245
3272
```
3246
3273
3247
3274
</td ><td >
@@ -3306,7 +3333,8 @@ with_tbl(tbl[FALSE, ] <- tbl[1, ])
3306
3333
3307
3334
``` r
3308
3335
with_df(df [NA , ] <- df [1 , ])
3309
- # > Error in `[<-.data.frame`(`*tmp*`, NA, , value = structure(list(n = 1L, : missing values are not allowed in subscripted assignments of data frames
3336
+ # > Error in `[<-.data.frame`:
3337
+ # > ! missing values are not allowed in subscripted assignments of data frames
3310
3338
```
3311
3339
3312
3340
</td ><td >
@@ -3375,7 +3403,8 @@ with_tbl(tbl[2:3, ] <- list(tbl$n[1], tbl$c[1:2], tbl$li[1]))
3375
3403
3376
3404
``` r
3377
3405
with_df(df [2 : 4 , ] <- df [1 : 2 , ])
3378
- # > Error in `[<-.data.frame`(`*tmp*`, 2:4, , value = structure(list(n = c(1L, : replacement element 1 has 2 rows, need 3
3406
+ # > Error in `[<-.data.frame`:
3407
+ # > ! replacement element 1 has 2 rows, need 3
3379
3408
```
3380
3409
3381
3410
</td ><td >
@@ -3397,7 +3426,8 @@ with_tbl(tbl[2:4, ] <- tbl[1:2, ])
3397
3426
3398
3427
``` r
3399
3428
with_df2(df2 [2 : 4 , ] <- df2 [1 , ])
3400
- # > Error in `[<-.data.frame`(`*tmp*`, 2:4, , value = structure(list(tb = structure(list(: replacement element 1 is a matrix/data frame of 1 row, need 3
3429
+ # > Error in `[<-.data.frame`:
3430
+ # > ! replacement element 1 is a matrix/data frame of 1 row, need 3
3401
3431
```
3402
3432
3403
3433
</td ><td >
@@ -3418,7 +3448,8 @@ with_tbl2(tbl2[2:4, ] <- tbl2[1, ])
3418
3448
3419
3449
``` r
3420
3450
with_df2(df2 [2 : 4 , ] <- df2 [2 : 3 , ])
3421
- # > Error in `[<-.data.frame`(`*tmp*`, 2:4, , value = structure(list(tb = structure(list(: replacement element 1 is a matrix/data frame of 2 rows, need 3
3451
+ # > Error in `[<-.data.frame`:
3452
+ # > ! replacement element 1 is a matrix/data frame of 2 rows, need 3
3422
3453
```
3423
3454
3424
3455
</td ><td >
@@ -3688,7 +3719,8 @@ with_tbl(tbl[as.character(-(3:5)), ] <- tbl[1, ])
3688
3719
3689
3720
``` r
3690
3721
with_df(df [NA_character_ , ] <- df [1 , ])
3691
- # > Error in `[<-.data.frame`(`*tmp*`, NA_character_, , value = structure(list(: missing values are not allowed in subscripted assignments of data frames
3722
+ # > Error in `[<-.data.frame`:
3723
+ # > ! missing values are not allowed in subscripted assignments of data frames
3692
3724
```
3693
3725
3694
3726
</td ><td >
@@ -3981,7 +4013,8 @@ with_tbl(tbl[2:3, "x"] <- 1)
3981
4013
3982
4014
``` r
3983
4015
with_df(df [2 : 3 , " n" ] <- NULL )
3984
- # > Error in x[[jj]][iseq] <- vjj: replacement has length zero
4016
+ # > Error in `x[[jj]][iseq] <- vjj`:
4017
+ # > ! replacement has length zero
3985
4018
```
3986
4019
3987
4020
</td ><td >
@@ -4134,7 +4167,8 @@ with_tbl(tbl[1, ][[3]] <- list(NULL))
4134
4167
4135
4168
``` r
4136
4169
with_df2(df2 [[1 , 1 ]] <- df [1 , ])
4137
- # > Error in `[[<-.data.frame`(`*tmp*`, iseq, value = structure(list(n = 1L, : replacement has 1 row, data has 4
4170
+ # > Error in `[[<-.data.frame`:
4171
+ # > ! replacement has 1 row, data has 4
4138
4172
```
4139
4173
4140
4174
</td ><td >
@@ -4185,7 +4219,8 @@ with_tbl2(tbl2[1, ][[1]] <- tbl[1, ])
4185
4219
4186
4220
``` r
4187
4221
with_df2(df2 [[1 , 2 ]] <- t(1 : 4 ))
4188
- # > Error in x[[jseq]][[iseq]] <- value: more elements supplied than there are to replace
4222
+ # > Error in `x[[jseq]][[iseq]] <- value`:
4223
+ # > ! more elements supplied than there are to replace
4189
4224
```
4190
4225
4191
4226
</td ><td >
@@ -4236,7 +4271,8 @@ with_tbl2(tbl2[1, ][[2]] <- t(1:4))
4236
4271
4237
4272
``` r
4238
4273
df [[1 : 2 , 1 ]]
4239
- # > Error in col[[i, exact = exact]]: attempt to select more than one element in vectorIndex
4274
+ # > Error in `col[[i, exact = exact]]`:
4275
+ # > ! attempt to select more than one element in vectorIndex
4240
4276
```
4241
4277
4242
4278
</td ><td >
@@ -4252,7 +4288,8 @@ tbl[[1:2, 1]]
4252
4288
4253
4289
``` r
4254
4290
with_df(df [[1 : 2 , 1 ]] <- 0 )
4255
- # > Error in `[[<-.data.frame`(`*tmp*`, 1:2, 1, value = 0): only a single element should be replaced
4291
+ # > Error in `[[<-.data.frame`:
4292
+ # > ! only a single element should be replaced
4256
4293
```
4257
4294
4258
4295
</td ><td >
0 commit comments