# NOT RUN {
loc1 = list(name = "m1", alleles = 3:4, afreq = c(.1, .9))
loc2 = list(name = "m2", alleles = c("1", "10.2", "3"))
x = setMarkers(singleton(1), locus = list(loc1, loc2))
db = getFrequencyDatabase(x)
db
y = setFrequencyDatabase(x, database = db)
stopifnot(identical(x, y))
# The database can also be read directly from file
tmp = tempfile()
write.table(db, tmp, row.names = TRUE, col.names = TRUE)
z = setFrequencyDatabase(x, database = tmp)
stopifnot(all.equal(x, z))
# }
Run the code above in your browser using DataLab