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。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。