| stream_filter | R Documentation |
Reads each partition, filters rows, and writes a new partitioned dataset. Output is written as one partition per input partition (empty partitions are allowed). This avoids materializing all results.
stream_filter(x, predicate, path = NULL, ...)
x |
A |
predicate |
Function |
path |
Output directory. If NULL, a temp dir is created. |
... |
Passed to |
A shard_dataset handle pointing to the filtered partitions.
s <- schema(x = float64())
sink <- table_sink(s, mode = "row_groups")
table_write(sink, 1L, data.frame(x = c(1.0, 2.0, 3.0)))
rg <- table_finalize(sink)
filtered <- stream_filter(rg, predicate = function(chunk) chunk$x > 1.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.