Individuals are assigned to populations based on the specimen metadata data file (csv) used with gl.read.dart().
This script renames a nominated population.
The script returns a genlight object with the new population name.
gl.rename.pop(x, old = NULL, new = NULL, verbose = NULL)
Name of the genlight object containing SNP genotypes [required].
Name of population to be changed [required].
New name for the population [required].
Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log; 3, progress and results summary; 5, full report [default 2 or as specified using gl.set.verbosity].
A genlight object with the new population name.
gl <- gl.rename.pop(testset.gl, old='EmsubRopeMata', new='Outgroup')
#> Starting gl.rename.pop
#> Processing genlight object with SNP data
#> Renaming EmsubRopeMata as Outgroup
#> Completed: gl.rename.pop
#>