Replace population/sample names with specified group labels.
relabel(data, ..., outfile = tempfile(fileext = ".ind"))
Updated S3 EIGENSTRAT data object with an additional 'group' slot specifying the path to a new ind file. #'
if (FALSE) # download an example genomic data set and prepare it for analysis
snps <- eigenstrat(download_data(dirname = tempdir()))
# group individual samples into larger populations, creating a new
# EIGENSTRAT R object
new_snps <- relabel(
snps,
European = c("French", "Sardinian"),
African = c("Dinka", "Yoruba", "Mbuti", "Khomani_San"),
Archaic = c("Vindija", "Altai", "Denisova")
)
#> Error: object 'snps' not found
# \dontrun{}