whist(spatstat)
whist()所属R语言包:spatstat
Weighted Histogram
加权直方图
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Computes the weighted histogram of a set of observations with a given set of weights.
与一组给定的权重来计算加权直方图的一组观察。
用法----------Usage----------
whist(x, breaks, weights = NULL)
参数----------Arguments----------
参数:x
Numeric vector of observed values.
的观察值的数值向量。
参数:breaks
Vector of breakpoints for the histogram.
矢量断点的直方图。
参数:weights
Numeric vector of weights for the observed values.
所观察到的值的权重的数值向量。
Details
详细信息----------Details----------
This low-level function computes (but does not plot) the weighted histogram of a vector of observations x using a given vector of weights.
这种低级别的函数计算(但不是图)加权直方图的观测向量x使用给定的向量,weights。
The arguments x and weights should be numeric vectors of equal length. They may include NA or infinite values.
的参数x和weights应该是数字向量的长度相等。它们可能包括NA或无穷大值。
The argument breaks should be a numeric vector whose entries are strictly increasing. These values define the boundaries between the successive histogram cells. The breaks do not have to span the range of the observations.
参数breaks应该是一个数值向量,其作品是严格递增。这些值定义了连续直方图单元之间的界限。场所不必跨越的范围内观测。
There are N-1 histogram cells, where N = length(breaks). An observation x[i] falls in the jth cell if breaks[j] <= x[i] < breaks[j+1] (for j < N-1) or breaks[j] <= x[i] <= breaks[j+1] (for j = N-1). The weighted histogram value h[j] for the jth cell is the sum of weights[i] for all observations x[i] that fall in the cell.
有N-1直方图单元,N = length(breaks)。观察x[i]在jTh单元下降,如果breaks[j] <= x[i] < breaks[j+1](j < N-1)breaks[j] <= x[i] <= breaks[j+1](j = N-1)。加权直方图值h[j]jTh单元的总和weights[i]的所有观测x[i]那年秋天的单元。
Note that, in contrast to the function hist, the function whist does not require the breakpoints to span the range of the observations x. Values of x that fall outside the range of breaks are handled separately; their total weight is returned as an attribute of the histogram.
请注意的是,在该函数相反hist,函数whist不需要断点跨越的范围内观测x。值x那年秋天的范围之外breaks均另案处理它们的总重量,则返回属性的直方图。
值----------Value----------
A numeric vector of length N-1 containing the histogram values, where N = length(breaks).
一个数字矢量的长度N-1包含直方图值,其中N = length(breaks)。
The return value also has attributes "low" and "high" giving the total weight of all observations that are less than the lowest breakpoint, or greater than the highest breakpoint, respectively.
返回值也有属性"low"和"high"的总重量低于最低断点,或大于最高断点的所有意见,分别。
(作者)----------Author(s)----------
Adrian Baddeley
<a href="mailto:Adrian.Baddeley@csiro.au">Adrian.Baddeley@csiro.au</a>
<a href="http://www.maths.uwa.edu.au/~adrian/">http://www.maths.uwa.edu.au/~adrian/</a>
and Rolf Turner
<a href="mailto:r.turner@auckland.ac.nz">r.turner@auckland.ac.nz</a>
with thanks to Peter Dalgaard.
实例----------Examples----------
x <- rnorm(100)
b <- seq(-1,1,length=21)
w <- runif(100)
whist(x,b,w)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|