# NOT RUN {
x = nuclearPed(fa = "father", mo = "mother", children = "boy")
m = marker(x, father = 1:2, mother = 1, boy = 1:2)
x = setMarkers(x, m)
y = list(singleton("father"), nuclearPed(mo = "mother", children = "boy"))
# By default all common individuals are transferred
transferMarkers(x, y)
# Transfer data for the boy only
transferMarkers(x, y, ids = "boy")
# Transfer without erasing marker attributes or others genotypes
# Note that `erase = FALSE` requires markers to be named
z = nuclearPed(children = "boy")
z = setMarkers(z, marker(z, '1' = c(2,2), alleles = 1:2, afreq = c(.1, .9)))
name(x, 1) = name(z, 1) = 'M1'
z2 = transferMarkers(x, z, ids = "boy", erase = FALSE)
z2
# Frequencies are not transferred
afreq(z2, 1)
# }
Run the code above in your browser using DataLab