R script for deterministic and stochastic two locus models with selection