rle_dt | R Documentation |
R6 class for a keyed data.table object that uses run-length encoding to reduce storage size
R6 class for a keyed data.table object that uses run-length encoding to reduce storage size
new()
Create an RLE-encoded copy of the data
rle_dt$new(data, keys = NULL, optimize_order = (length(keys) <= 4))
data
A data.frame or data.table object containing original data
keys
A character vector of keys within data
that should be RLE-encoded
optimize_order
A boolean indicating whether to search for the smallest encoding scheme. The default it to search in data with 4 or fewer keys, but not to search for 5+. Optionally, if a positive integer, randomly test ordering over this number of permutations.
get()
Simple method to return the data.table with all columns in their original form.
rle_dt$get()
Note that the data are modified slightly in that the keys columns are placed first, and the data are ordered in the order of the keys (as originally provided, left-to-right)
clone()
The objects of this class are cloneable with this method.
rle_dt$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.