The data.table object in the environment panel will not update its preview after adding new variables using the :=
method. However, str(dt)
shows the correct data, and assigning dt
new variable leads to the correct viewing in the "Environment" panel.
dt <- data.table(x = 1:10, y = log(1:10), z = (1:10)**2) dt[, a := x + y, ] dt[, b := x + z, ] str(dt) d <- dt
Is it by design, a known bug, or is there a solution? The behavior is interesting, and I'm curious why this is happening.
Mitch source share