A filter method for gen_tibble
objects
Usage
# S3 method for class 'gen_tbl'
filter(..., deparse.level = 1)
Examples
test_gt <- example_gt("gen_tbl")
test_gt %>% filter(id %in% c("a", "c"))
#> # A gen_tibble: 6 loci
#> # A tibble: 2 × 3
#> id population genotypes
#> <chr> <chr> <vctr_SNP>
#> 1 a pop1 1
#> 2 c pop2 3
test_gt <- example_gt("grouped_gen_tbl_sf")
test_gt %>% filter(id %in% c("a", "c"))
#> Simple feature collection with 2 features and 5 fields
#> Geometry type: POINT
#> Dimension: XY
#> Bounding box: xmin: 0 ymin: 49 xmax: 2 ymax: 51
#> Geodetic CRS: WGS 84
#> # A gen_tibble: 6 loci
#> # A tibble: 2 × 6
#> # Groups: population [2]
#> id population longitude latitude genotypes geometry
#> * <chr> <chr> <dbl> <dbl> <vctr_SNP> <POINT [°]>
#> 1 a pop1 0 51 1 (0 51)
#> 2 c pop2 2 49 3 (2 49)