writeCSV {relSim}R Documentation

Saves/writes population frequencies 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

writeCSV(fileName, pop, n = 100, delim = ",")

Arguments

fileName

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

pop

a list containing elements loci and freqs. loci is a vector with the loci in the data set. freqs is a list of vectors with elements named after the elements in loci. Each locus in freqs is a vector of allele frequencies with the allele names given by the named elements. 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.

n

the number of people in the database. This is arbitrarily set to 100 by default.

delim

The allele delimiter.

Value

a matrix which contains the table written to file.

Note

Rare alleles are recoded to 108.1. This is unlikely to do the right thing when you have things like <5 or >20 in your allele names. Given it is impossible to predict what a user would like to do, I suggest you recode them yourself before using this function.

Author(s)

James M. Curran

See Also

breedFst USCaucs

Examples


data(USCaucs)
## Not run: 
  writeCSV("USCaucs.csv", USCaucs)

## End(Not run)


[Package relSim version 1.0.0 Index]