I want to use := operator from data.table without loading data.table. For example for the following data.table, I want to add another column called error
:
DT <- data.table::data.table(station = rep(1:1,52560), mod = rnorm(1*52560),obs = rnorm(1*52560))
If I do the following everything goes well, however, I am puzzled how it worked without referring to package data.table (the data.table library is not loaded)?!!
DT[ , `:=`(error = mod - obs)]
How can I rewrite the above line using data.table::::=
?!!