nonConDist(spider)
nonConDist()所属R语言包:spider
Nearest non-conspecific and maximum intra-specific distances
距离最近的同种和最大的内特定的距离
译者:生物统计家园网 机器人LoveR
描述----------Description----------
These functions give the distances to the nearest non-conspecific and furthest conspecific representatives for each individual in the dataset.
这些功能给距离最近的非同种同种和最远的代表为每个数据集。
用法----------Usage----------
nonConDist(distobj, sppVector, propZero = FALSE, rmNA = FALSE)
maxInDist(distobj, sppVector, propZero = FALSE, rmNA = FALSE)
参数----------Arguments----------
参数:distobj
Distance matrix.
距离矩阵。
参数:sppVector
Species vector (see sppVector). Default of NULL.
种向量(参见sppVector“)。默认值为NULL。
参数:propZero
Logical. TRUE gives the proportion of zero distances.
逻辑。 TRUE给出零的距离的比例。
参数:rmNA
Logical. TRUE ignores missing values in the distance matrix. Default of FALSE
逻辑。 TRUE忽略的距离矩阵中的缺失值。默认值为FALSE
Details
详细信息----------Details----------
nonConDist returns the minimum inter-specific distance for each individual.
nonConDist返回对每个个体的最小间的特定距离。
maxInDist returns the maximum intra-specific distance for each individual.
maxInDist返回最大为每个特定的距离内。
These two functions can be used to create a version of the barcoding gap.
这两个功能可以用于创建一个版本的条形编码间隙。
值----------Value----------
If propZero=FALSE, a numeric vector giving the distance of the closest non-conspecific individual (nonConDist) or the most distant conspecific individual (maxInDist).
如果propZero=FALSE,给距离最近的非同种个体(nonConDist)或同种个体最遥远的一个数值向量(maxInDist)。
If propZero=TRUE, a single number giving the proportion of zero distances.
如果propZero=TRUE,一个单一的数字给的比例零距离。
(作者)----------Author(s)----------
Samuel Brown <s_d_j_brown@hotmail.com>
实例----------Examples----------
data(anoteropsis)
anoDist <- dist.dna(anoteropsis)
anoSpp <- sapply(strsplit(dimnames(anoteropsis)[[1]], split="_"),
function(x) paste(x[1], x[2], sep="_"))
nonConDist(anoDist, anoSpp)
nonConDist(anoDist, anoSpp, propZero=TRUE)
maxInDist(anoDist, anoSpp)
maxInDist(anoDist, anoSpp, propZero=TRUE)
#Barcoding gap[条码技术差距]
inter <- nonConDist(anoDist, anoSpp)
intra <- maxInDist(anoDist, anoSpp)
hist(inter-intra)
#An alternative way of plotting the gap[绘制的间隙的另一种方式]
bnd <- cbind(data.frame(inter, intra))
ord <- bnd[order(bnd$inter),]
plot(ord$inter, type="n", ylab="Percent K2P distance", xlab="Individual")
segCol <- rep("gray50", length(ord$inter))
segCol[ord$inter-ord$intra < 0] <- "red"
segments(x0=1:length(ord$inter), y0=ord$inter, y1=ord$intra, col=segCol, lwd=6)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|