Hi there,

I have just installed the new version of data.table and used the "fresh"
function combining *:= in j *with *by*, and I am very happy with it. So
first I want to thank the maintainers/developers for the library and the
new function.

The main reason for my email, though, is the following: I had a variable
called results62. I created a column of NAs called LAGMKTCAP and
subsequently tried to change the values of this column using

results62[,LAGMKTCAP :=
results62$MKTCAP[match(results62$PM,results62$TM)],by=PERMNO]

without having created the column TM beforehand. I received the output from
R of the head and tail of my object results62, as expected, but the column
LAGMKTCAP hadn't been changed. Only later did I realise I had forgotten to
create the column TM.

Wouldn't it be desirable to return an error when trying to use a column of
the data.table object which doesn't yet exist? Is this normal behaviour or
a bug?



Vivianne
----------------------------------------------
“Don't worry about the world coming to an end today. It is already tomorrow
in Australia.”
_______________________________________________
datatable-help mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help

Reply via email to