Call to dcast had wrong argument name for value.var