# Example of frequency format file
data(jsmackerel)
jsm.mt.freq.file <- tempfile()
jsm.popname.file <- tempfile()
cat(jsmackerel$mtDNA.freq, file=jsm.mt.freq.file, sep="\n")
cat(jsmackerel$popname, file=jsm.popname.file, sep=" ")
# Read frequency format file with subpopulation names
# Prepare your frequency format file and population name file in the working directory
# Replace "jsm.mt.freq.file" and "jsm.popname.file" by your file names.
popdata.mt <- read.frequency(frequency=jsm.mt.freq.file, popname=jsm.popname.file)
# Read frequency file without subpopulation names
popdata.mt.noname <- read.frequency(frequency=jsm.mt.freq.file)
Run the code above in your browser using DataLab