Это старая версия документа!
C1 Chondrite, Sun McDonough, 1989 + Mantle Taylor, McLennan, 1985
C1 Chondrite + Mantle (3 ex)
Details
Reference | Sun, S-S, McDonough, WF Chemical and isotopic systematics of oceanic basalts: implications for mantle composition and processes, 1989 [ref] |
Data | bulk |
Input | ppm |
- заголовок
- краткое описание
- статья
- ссылка
- карточка
- подробное описание
- код
- тест
Source
- require('ggplot2');
- cmp <- read.csv("constants_oceanic_basalts_compositions.csv", sep=";", stringsAsFactors=F);
- curst <- read.csv("constants_continental_curst_taylor1985.csv", sep=",", stringsAsFactors=F);
- spdgrams.lan_c1_chondrite_sun_wm_taylor <- function(ppm_data, el_order = NULL)
- {
- ns <- el_order;
- if (is.null(el_order)) {
- ns <- c('La','Ce','Pr','Nd','Sm','Eu','Gd','Tb','Dy','Ho','Er','Tm','Yb','Lu');
- }
- pmsc <- c();
- for (n in ns)
- pmsc <- c(pmsc, subset(cmp, element == n)$c1_chondrite);
- cn <- curst$Element;
- tcurst <- data.frame(t(curst));
- tcurst <- tcurst[-c(1,5),];
- tcurst<- unname(tcurst);
- names(tcurst) <- cn;
- tcurst <- cbind(
- data.frame(Name=c('Lower','Middle','Upper')),
- tcurst
- );
- print(ppm_data);
- print(tcurst);
- ds <- selectNames(ppm_data,c(paste0(ns,'_ppm')));
- print(tcurst$Eu);
- ds_curst <- selectNames(tcurst, ns);
- ds <-rbind(ds,ds_curst);
- names(ds) <- ns;
- ret <- c();
- values <- cbind(ppm_data$Name, rowApply(`/`,ds,pmsc));
- names(values)[1] <- 'Name';
- ret$values <- values;
- ret$grades <- ns;
- ret$labels <- c('REE', 'Sample/C1 Chondrite');
- return(ret);
- }
- spdgrams.lan_c1_chondrite_sun_wm_taylor.test <- function()
- {
- spdgrams.lan_c1_chondrite_sun_wm_taylor(data.frame(Name=c('Test'),Eu_ppm=c(34.5)));
- }