xy.unique.x(sfsmisc)
xy.unique.x()所属R语言包:sfsmisc
Uniqify (X,Y) Values using Weights
Uniqify(X,Y)值使用权
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Given smoother data (x_i, y_i) and maybe weights w_i, with multiple x_i, use the unique x values, replacing the y's by their (weighted) mean and updating the weights accordingly.
平滑的数据(x_i, y_i)和可能的权重w_i,与多个x_i,使用独特的X值,(加权)平均更换y的和更新的权重相应地。
用法----------Usage----------
xy.unique.x(x, y, w, fun.mean = mean)
参数----------Arguments----------
参数:x,y
numeric vectors of same length. Alternatively, x can be “xy” like structure.
相同的长度的数值向量。另外,x是“XY”状结构。
参数:w
numeric vector of non-negative weights – or missing which corresponds to all weights equal.
非负权重的数值向量 - 或缺少这对应于所有的权重相等。
参数:fun.mean
the mean function to use.
的均值函数使用。
值----------Value----------
Numeric matrix with three columns, named x, y and w with unique x values and corresponding y and weights w.
数字矩阵有三列,名为x,y和w独特的x的值和对应的y和重量w。
(作者)----------Author(s)----------
Martin Maechler, 8 Mar 1993.
参见----------See Also----------
e.g., smooth.spline uses something like
例如,smooth.spline使用类似
实例----------Examples----------
## simple example:[#简单的例子:]
xy.unique.x(c(1,1,1,2,4), 1:5)
# x y w[X,Y瓦特]
# 1 1 2 3[1 1 2 3]
# 2 2 4 1[2 2 4 1]
# 3 4 5 1[3 4 5 1]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|