Given genetic distance of m morgans (m=centimorgans/100)
p_co=function(m,i){ return(exp(-m)*m^i/factorial(i)) }
Given a genetic distance of m morgans. sums over possible numbers of crossovers from 0 to (the very unlikely) 10.
h=function(m){ return(sum(sapply(0:10, function(i) return( 2/3*(1-(-0.5)^(i))*p_co(m,i) )))) }
d=function(m){ h(m/100)+(1-h(m/100))/2}
Plot % drive vs. cM distance
#Range of possible cM from 0 to 200
centimorgans<-0:2000/10
# % drive using equation above
drive_percent=sapply(0:2000/10,function(x) d(x))
plot(drive_percent~centimorgans,type="l")