The walrus operator suppresses printing, but calling print explicitly does work.
library(data.table)
dt <- data.table(x = 1)
print(dt[, a := "a"])
#> x a
#> <num> <char>
#> 1: 1 a
However, I woudl've assumed that enclosing the expression in parentheses would also work. It doesn't!
Created on 2025-10-05 with reprex v2.1.1