filter rows of a hail Table
Usage
# S3 method for class 'hail.table.Table'
filter(.data, ..., .by = NULL, .preserve = FALSE)
Note
writes one line of table to disk to retrieve field names
FIXME: uses disk because I don't know how to create a BooleanExpression except by importing.
Examples
hl <- hail_init()
annopath <- path_1kg_annotations()
tab <- hl$import_table(annopath, impute = TRUE)$key_by("Sample")
pick <- rep(FALSE, 3500)
pick[seq_len(10)] <- TRUE
ft <- filter(tab, filter = pick, hl = hl)
ft$count()
#> [1] 10
ft$head(2L)$collect()
#> [[1]]
#> Struct(Sample='HG00096', Population='GBR', SuperPopulation='EUR', isFemale=False, PurpleHair=False, CaffeineConsumption=4, tmpf=True)
#>
#> [[2]]
#> Struct(Sample='HG00097', Population='GBR', SuperPopulation='EUR', isFemale=True, PurpleHair=True, CaffeineConsumption=4, tmpf=True)
#>