fstpackage / fsttable

An interface to fast on-disk data tables stored with the fst format
GNU Affero General Public License v3.0
27 stars 4 forks source link

See how the ALTREP framework can be integrated with fsttable #36

Open MarcusKlik opened 6 years ago

MarcusKlik commented 6 years ago

R 3.5.0 brings (an experimental implementation of) the ALTREP framework. It would be very useful to detect and use compact expressions like 1:N. For example, when a range is specified in i, detecting a ALTREP vector means that we don't have to run a loop to detect ranges anymore (#35).

(see the ALTREP draft vignette for details)

Also, ALTREP provides for a mechanism for delayed loading of the actual vector data until it's required. Perhaps that can be used to return vectors in compact format:

# returns a compact object without actual data
x <- ft[10:20, X]

# regular methods can use the object
max(x)