This function takes 3d arrays of blocked f2, allele frequency products, and counts, splits them by population pair,
and writes each pair to a separate .rds
file under {outdir}/{pop1}/{pop2}.rds
.
write_f2(est_arr, count_arr, outdir, id = "f2", overwrite = FALSE)
A 3d array with blocked f2, allele frequency products, or fst estimates for each population pair. The first two dimensions of each array have to have population names.
A 3d array of the same dimension with counts
Directory where data will be stored
Postfix showing the type of statistic ("f2", "ap", or "fst")
Overwrite existing files in outdir
if (FALSE) {
write_f2(f2_arr, count_arr, outdir = 'path/to/f2stats/')
}