subset.listw(spdep)
subset.listw()所属R语言包:spdep
Subset a spatial weights list
子集空间权重列表
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The function subsets a spatial weights list, retaining objects for which the subset argument vector is TRUE. At present it will only subset non-general weights lists (that is those created by nb2listw with glist=NULL).
功能子集空间权重列表,保留对象的子集参数向量为TRUE。目前,它只会子集,非一般的权重列表(即所创建的nb2listwglist=NULL)。
用法----------Usage----------
## S3 method for class 'listw'
subset(x, subset, zero.policy = NULL, ...)
参数----------Arguments----------
参数:x
an object of class listw
一个对象的类listw
参数:subset
logical expression
逻辑表达式
参数:zero.policy
default NULL, use global option value; if FALSE stop with error for any empty neighbour sets, if TRUE permit the weights list to be formed with zero-length weights vectors - passed through to nb2listw
默认为空,请使用全局选项的值,如果为FALSE停止任何空的邻居集的错误,如果TRUE许可证的权重的列表来形成的零长度的权重向量 - 通过nb2listw的
参数:...
generic function pass-through
通用直通功能
值----------Value----------
The function returns an object of class listw with component style the same as the input object, component neighbours a list of integer vectors containing neighbour region number ids (compacted to run from 1:number of regions in subset), and component weights as the weights computed for neighbours using style.
该函数返回一个对象的类listw组件style相同的输入对象,组件neighbours的列表整数向量含有邻域的IDS(压缩运行1:数区域的子集),组件weights的权重计算neighbours使用style。
(作者)----------Author(s)----------
Roger Bivand <a href="mailto:Roger.Bivand@nhh.no">Roger.Bivand@nhh.no</a>
参见----------See Also----------
nb2listw, subset.nb
nb2listw,subset.nb
实例----------Examples----------
example(columbus)
to.be.dropped <- c(31, 34, 36, 39, 42, 46)
pre <- nb2listw(col.gal.nb)
print(pre)
post <- subset(pre, !(1:length(col.gal.nb) %in% to.be.dropped))
print(post)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|