Basalts Geodinamic Settings, Pearce.
Reference | |
Data | bulk |
Input | Ti_ppm, Zr_ppm, Y_ppm |
require('ggtern'); classifydiag.basalts_pearce <- function (wtp_data, ...) { ds <- selectNames(wtp_data,c('Name','Ti_ppm','Zr_ppm','Y_ppm')); pts <- data.frame(Name=ds$Name, X = ds$Zr_ppm, Y = ds$Ti_ppm/100, Z = ds$Y_ppm*3); labels <- c("Zr", "Ti/100", "Y*3"); ret <- c(); ret$type <- "ternogram"; ret$points <- pts; ret$labels <- labels; return(ret); }