Save the tibble (and update the backing files). The gen_tibble
object is
saved to a file with extension .gt, together with update its .rds and
.bk files. Note that multiple .gt files can be linked to the same .rds
and .bk files; generally, this occurs when we create multiple subsets of
the data. The .gt file then stores the information on what subset of the
full dataset we are interested in, whilst the .rds and .bk file store the
full dataset. To reload a gen_tibble
, you can pass the name of the .gt
file with gt_load()
.
Arguments
Examples
example_gt <- example_gt("gen_tbl")
# remove some individuals
example_gt <- example_gt %>% filter(id != "a")
# save filtered gen_tibble object
gt_save(example_gt, file_name = paste0(tempfile(), "_example_filtered"))
#>
#> gen_tibble saved to /tmp/RtmpyN1xne/file22a2225f4283_example_filtered.gt
#> using bigSNP file: /tmp/RtmpyN1xne/file22a23dc704cc.rds
#> with backing file: /tmp/RtmpyN1xne/file22a23dc704cc.bk
#> make sure that you do NOT delete those files!
#> to reload the gen_tibble in another session, use:
#> gt_load('/tmp/RtmpyN1xne/file22a2225f4283_example_filtered.gt')
#> [1] "/tmp/RtmpyN1xne/file22a2225f4283_example_filtered.gt"
#> [2] "/tmp/RtmpyN1xne/file22a23dc704cc.rds"
#> [3] "/tmp/RtmpyN1xne/file22a23dc704cc.bk"