R語言
Skye
位於 MASS
包(package)。 說明
Skye
數據幀有 23 行和 3 列。
用法
Skye
格式
該 DataFrame 包含以下列:
A
-
鈉和鉀氧化物的百分比。
F
-
氧化鐵的百分比。
M
-
氧化鎂的百分比。
例子
# ternary() is from the on-line answers.
ternary <- function(X, pch = par("pch"), lcex = 1,
add = FALSE, ord = 1:3, ...)
{
X <- as.matrix(X)
if(any(X < 0)) stop("X must be non-negative")
s <- drop(X %*% rep(1, ncol(X)))
if(any(s<=0)) stop("each row of X must have a positive sum")
if(max(abs(s-1)) > 1e-6) {
warning("row(s) of X will be rescaled")
X <- X / s
}
X <- X[, ord]
s3 <- sqrt(1/3)
if(!add)
{
oldpty <- par("pty")
on.exit(par(pty=oldpty))
par(pty="s")
plot(c(-s3, s3), c(0.5-s3, 0.5+s3), type="n", axes=FALSE,
xlab="", ylab="")
polygon(c(0, -s3, s3), c(1, 0, 0), density=0)
lab <- NULL
if(!is.null(dn <- dimnames(X))) lab <- dn[[2]]
if(length(lab) < 3) lab <- as.character(1:3)
eps <- 0.05 * lcex
text(c(0, s3+eps*0.7, -s3-eps*0.7),
c(1+eps, -0.1*eps, -0.1*eps), lab, cex=lcex)
}
points((X[,2] - X[,3])*s3, X[,1], ...)
}
ternary(Skye/100, ord=c(1,3,2))
來源
R. N. Thompson、J. Esson 和 A. C. Duncan (1972) 斯凱島始新世熔岩中的主要元素化學變化。岩石學雜誌,13, 219-253。
參考
J. Aitchison (1986) The Statistical Analysis of Compositional Data. Chapman and Hall, p.360.
Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.
相關用法
- R Sitka89 1989 年西特卡雲杉樹的生長曲線
- R Sitka 1988 年西特卡雲杉樹的生長曲線
- R summary.rlm 魯棒線性模型的總結方法
- R ginv 廣義逆矩陣
- R housing 哥本哈根住房條件調查的頻率表
- R biopsy 乳腺癌患者的活檢數據
- R predict.qda 根據二次判別分析進行分類
- R contr.sdif 連續差異對比編碼
- R Melanoma 惡性黑色素瘤的生存率
- R boxcox 線性模型的 Box-Cox 變換
- R predict.glmmPQL glmmPQL 擬合的預測方法
- R ucv 帶寬選擇的無偏交叉驗證
- R theta.md 估計負二項式的 theta
- R parcoord 平行坐標圖
- R rlm 線性模型的穩健擬合
- R npk 經典 N、P、K 階乘實驗
- R Cars93 1993 年美國銷售的 93 輛汽車的數據
- R predict.lda 通過線性判別對多變量觀測值進行分類
- R geyser 老忠實間歇泉數據
- R summary.negbin 類“negbin”對象的摘要方法函數
- R Aids2 澳大利亞艾滋病生存數據
- R truehist 繪製直方圖
- R mcycle 來自模擬摩托車事故的數據
- R loglm1 通過迭代比例縮放擬合對數線性模型 - 內部函數
注:本文由純淨天空篩選整理自R-devel大神的英文原創作品 AFM Compositions of Aphyric Skye Lavas。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。