R code across multiple population genetic packages