batchTest {Andromeda} | R Documentation |
Apply a boolean test to batches of data in an Andromeda table and terminate early
Description
Apply a boolean test to batches of data in an Andromeda table and terminate early
Usage
batchTest(tbl, fun, ..., batchSize = 1e+05)
Arguments
tbl |
An |
fun |
A function where the first argument is a data frame and returns a logical value. |
... |
Additional parameters passed to |
batchSize |
Number of rows to fetch at a time. |
Details
This function applies a boolean test function to sets of
data and terminates at the first FALSE
.
Value
Returns FALSE
if any of the calls to the user-supplied function returned FALSE
, else returns TRUE
.
Examples
andr <- andromeda(cars = cars)
fun <- function(x) {
is.unsorted(x %>% select(speed) %>% collect())
}
result <- batchTest(andr$cars, fun, batchSize = 25)
result
# [1] FALSE
close(andr)
[Package Andromeda version 0.6.6 Index]