test <- snp_attachExtdata()
table(test$fam$family.ID)
# Get populations clusters from external files
files <- system.file("extdata", paste0("cluster", 1:3), package = "bigsnpr")
bigreadr::fread2(files[1])
bigreadr::fread2(files[1], header = FALSE) # need header option here
infos <- snp_getSampleInfos(test, files, header = FALSE)
table(infos[[1]])
Run the code above in your browser using DataLab