Learn R Programming

relSim (version 1.0.0)

writePop: Saves/writes population profiles to disk

Description

Writes a population of profiles to disk using the original allele designations rather than the internal integer representations that are used for the other functions.

Usage

writePop(fileName, pop, addAmelo = FALSE, delim = ",", dupLoci = TRUE)

Arguments

fileName

the name and path where the population profiles are to be saved to.

pop

an object of class population, most likely produced by breedFst

addAmelo

The simulated populations do not have Amelogenin. If TRUE then an Amelogenin marker is added to the population, and all the profiles are set to male XY, although this is coded to 1,2 to keep the allele designations numeric.

delim

The allele delimiter.

dupLoci

If TRUE the locus names are written twice in the header, otherwise just once.

Author

James M. Curran

See Also

breedFst

Examples

Run this code

data(USCaucs)
pop = breedFst(USCaucs)
if (FALSE) {
  writePop("USCaucs.csv", pop)
  }

Run the code above in your browser using DataLab