Skip to content
Prev 361164 / 398513 Next

Reduce does not work with data.table?

This is a design feature of data.table objects, which don't conform to the normal functional programming paradigm that R is usually designed to adhere to and which Reduce expects. Specifically, they normally modify in-place rather than leaving the original object alone. 

In short, don't do that. Read more about how data.tables work. Their benefits come with distinct disadvantages that you need to be very clear about or you will get into trouble like this regularly.