Data.table: special symbols could have also function call form

Created on 26 Mar 2020  路  2Comments  路  Source: Rdatatable/data.table

so

.N()
.SD()
.I()

etc., will all have exactly the same meaning as their symbol forms

That would address https://github.com/Rdatatable/data.table/issues/4318

Most helpful comment

I feel like this would cause confusion by users. The confusion being: why do some examples have .N() while other examples have .N.

And while .N is one thing, there are a lot of use cases of subsetting with .SD and .I. Do we want to support both .SD()[var1 > 3, sum(var2)] in addition to .SD[var1 > 3, sum(var2)]?

All 2 comments

I feel like this would cause confusion by users. The confusion being: why do some examples have .N() while other examples have .N.

And while .N is one thing, there are a lot of use cases of subsetting with .SD and .I. Do we want to support both .SD()[var1 > 3, sum(var2)] in addition to .SD[var1 > 3, sum(var2)]?

We don't need to put those into examples, we just need to translate them internally.

Was this page helpful?
0 / 5 - 0 ratings