Returns number of rows affected by last := or set().

.Last.updated

Value

Integer.

Details

Be aware that in the case of duplicate indices, multiple updates occur (duplicates are overwritten); .Last.updated will include all of the updates performed, including duplicated ones. See examples.

See also

Examples

d = data.table(a=1:4, b=2:5) d[2:3, z:=5L]
#> a b z #> 1: 1 2 NA #> 2: 2 3 5 #> 3: 3 4 5 #> 4: 4 5 NA
.Last.updated
#> [1] 2
# updated count takes duplicates into account #2837 DT = data.table(a = 1L) DT[c(1L, 1L), a := 2:3]
#> a #> 1: 3
.Last.updated
#> [1] 2