Это старая версия документа!


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

  1. require('ggplot2');
  2.  
  3. cmp <- read.csv("constants_oceanic_basalts_compositions.csv", sep=";", stringsAsFactors=F);
  4. curst <- read.csv("constants_continental_curst_taylor1985.csv", sep=",", stringsAsFactors=F);
  5.  
  6. spdgrams.lan_c1_chondrite_sun_wm_taylor <- function(ppm_data, el_order = NULL)
  7. {
  8.  
  9. ns <- el_order;
  10.  
  11. if (is.null(el_order)) {
  12. ns <- c('La','Ce','Pr','Nd','Sm','Eu','Gd','Tb','Dy','Ho','Er','Tm','Yb','Lu');
  13. }
  14.  
  15. pmsc <- c();
  16.  
  17. for (n in ns)
  18. pmsc <- c(pmsc, subset(cmp, element == n)$c1_chondrite);
  19.  
  20. cn <- curst$Element;
  21.  
  22. tcurst <- data.frame(t(curst));
  23. tcurst <- tcurst[-c(1,5),];
  24.  
  25. tcurst<- unname(tcurst);
  26. names(tcurst) <- cn;
  27.  
  28. tcurst <- cbind(
  29. data.frame(Name=c('Lower','Middle','Upper')),
  30. tcurst
  31. );
  32.  
  33. print(ppm_data);
  34.  
  35. print(tcurst);
  36.  
  37. ds <- selectNames(ppm_data,c(paste0(ns,'_ppm')));
  38.  
  39. print(tcurst$Eu);
  40. ds_curst <- selectNames(tcurst, ns);
  41.  
  42. ds <-rbind(ds,ds_curst);
  43.  
  44. names(ds) <- ns;
  45.  
  46. ret <- c();
  47.  
  48. values <- cbind(ppm_data$Name, rowApply(`/`,ds,pmsc));
  49. names(values)[1] <- 'Name';
  50.  
  51. ret$values <- values;
  52. ret$grades <- ns;
  53. ret$labels <- c('REE', 'Sample/C1 Chondrite');
  54.  
  55. return(ret);
  56. }
  57.  
  58. spdgrams.lan_c1_chondrite_sun_wm_taylor.test <- function()
  59. {
  60. spdgrams.lan_c1_chondrite_sun_wm_taylor(data.frame(Name=c('Test'),Eu_ppm=c(34.5)));
  61. }
  • spdgrams/lan_c1_chondrite_sun_wm_taylor.1481830426.txt.gz
  • Последние изменения: 2018/11/12 15:08
  • (внешнее изменение)