# NOT RUN {
x = nuclearPed(1)
x = addMarker(x, alleles = 1:2)
# Set genotypes
genotype(x, marker = 1, id = 1) = "1/2"
# Set marker name
name(x, 1) = "M"
# Change allele freqs
afreq(x, "M") = c(`1` = 0.1, `2` = 0.9)
# Set position
chrom(x, "M") = 1
posMb(x, "M") = 123.45
# Check result
m = marker(x, `1` = "1/2", name = "M", afreq = c(`1` = 0.1, `2` = 0.9),
chrom = 1, posMb = 123.45)
stopifnot(identical(x$MARKERS[[1]], m))
# }
Run the code above in your browser using DataLab