View source: R/gl.make.recode.pop.r
gl.make.recode.pop | R Documentation |
Renaming populations may be required when there have been errors in assignment arising in the process from sample to DArT files or when one wishes to amalgamate populations, or delete populations. Recoding populations can also be done with a recode table (csv).
gl.make.recode.pop(
x,
out.recode.file = "recode_pop_table.csv",
outpath = tempdir(),
verbose = NULL
)
x |
Name of the genlight object containing the SNP data [required]. |
out.recode.file |
File name of the output file (including extension) [default recode_pop_table.csv]. |
outpath |
Path where to save the output file [default tempdir(), mandated by CRAN]. Use outpath=getwd() or outpath='.' when calling this function to direct output files to your working directory. |
verbose |
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]. |
This script facilitates the construction of a recode table by producing a proforma file with current population names in two identical columns. Edit the second column to reassign populations. Use keyword Delete to delete a population.
Apply the recoding using gl.recode.pop().
A vector containing the new population names.
Custodian: Arthur Georges – Post to https://groups.google.com/d/forum/dartr
result <- gl.make.recode.pop(testset.gl,out.recode.file='test.csv',outpath=tempdir(),verbose=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.