cM = 0:200
dat = cbind(Haldane = haldane(cM = cM),
Kosambi = kosambi(cM = cM))
matplot(cM, dat, ylab = "Recombination rate", type = "l")
legend("topleft", legend = colnames(dat), col = 1:2, lty = 1:2)
rho = seq(0, 0.49, length = 50)
dat2 = cbind(Haldane = haldane(rho = rho),
Kosambi = kosambi(rho = rho))
matplot(rho, dat2, xlab = "Recombination rate", ylab = "cM", type = "l")
legend("topleft", legend = colnames(dat), col = 1:2, lty = 1:2)
Run the code above in your browser using DataLab