This package provides numerical simulations of tristylous plant populations. Use devtools to install, e.g.,
if (!'devtools' %in% rownames(installed.packages()))
install.packages("devtools", repos="https://cran.r-project.org")
devtools::install_github("mtmorgan/Tristyly")
See the vignette for additional detail.