This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate lotto numbers | |
# Avoid a split pot | |
# Author: Jared Knowles | |
# Date: 11/26/2012 | |
# All numbers are equally likely to be selected to win in PowerBall, | |
# but what fun is winning if we have to share the pot? | |
# Therefore, we will only select numbers that minimize our | |
# likelihood of sharing the pot. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### A piper diagram based on the ternary plot example here: http://srmulcahy.github.io/2012/12/04/ternary-plots-r.html | |
### This was written quickly, and most likely contains bugs - I advise you to check it first. | |
### Jason Lessels [email protected] | |
### This now consists of two functions. transform_piper_data transforms the data to match | |
### the coordinates of the piper diagram. ggplot_piper does all of the background. | |
transform_piper_data <- function(Mg, Ca, Cl,SO4, name=NULL){ | |
if(is.null(name)){ |