| stream_map | R Documentation |
Applies f() to each partition and returns the list of per-partition results.
This is still much cheaper than collecting the full dataset when f() returns
a small summary per partition.
stream_map(x, f, ...)
## S3 method for class 'shard_row_groups'
stream_map(x, f, ...)
## S3 method for class 'shard_dataset'
stream_map(x, f, ...)
x |
A |
f |
Function |
... |
Passed to |
A list of per-partition values, one element per row-group file.
s <- schema(x = float64())
sink <- table_sink(s, mode = "row_groups")
table_write(sink, 1L, data.frame(x = rnorm(5)))
rg <- table_finalize(sink)
nrows <- stream_map(rg, nrow)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.