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
# Add repo to install the last R | |
sudo apt install apt-transport-https software-properties-common | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 | |
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu disco-cran35/' | |
# Install R | |
sudo apt update | |
sudo apt install gdebi libxml2-dev libssl-dev libcurl4-openssl-dev libopenblas-dev r-base r-base-dev | |
# Install RStudio |
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)){ |