Learn R Programming

data.table (version 1.12.6)

.Last.updated: Number of rows affected by last update

Description

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

Usage

.Last.updated

Arguments

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

Run this code
# NOT RUN {
d = data.table(a=1:4, b=2:5)
d[2:3, z:=5L]
.Last.updated

# updated count takes duplicates into account #2837
DT = data.table(a = 1L)
DT[c(1L, 1L), a := 2:3]
.Last.updated
# }

Run the code above in your browser using DataLab