找回密码
 注册
查看: 347|回复: 0

R语言 spdep包 subset.nb()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 14:45:50 | 显示全部楼层 |阅读模式
subset.nb(spdep)
subset.nb()所属R语言包:spdep

                                        Subset a neighbours list
                                         集A的邻居列表

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

The function subsets a neighbors list, retaining objects for which the subset argument vector is TRUE.
该功能的子集邻居“列表中,保留对象的子集参数向量为TRUE。


用法----------Usage----------


## S3 method for class 'nb'
subset(x, subset, ...)



参数----------Arguments----------

参数:x
an object of class nb
一个对象的类nb


参数:subset
logical expression
逻辑表达式


参数:...
generic function pass-through
通用直通功能


值----------Value----------

The function returns an object of class nb with a list of integer vectors containing neighbour region number ids (compacted to run from 1:number of regions in subset).
该函数返回一个类的对象nb整数向量含有邻域的入侵检测系统(压缩运行1:一些区域的子集)的列表。


(作者)----------Author(s)----------


Roger Bivand <a href="mailto:Roger.Bivand@nhh.no">Roger.Bivand@nhh.no</a>



参见----------See Also----------

nb2listw
nb2listw


实例----------Examples----------


example(columbus)
coords <- coordinates(columbus)
plot(col.gal.nb, coords)
to.be.dropped <- c(31, 34, 36, 39, 42, 46)
text(coords[to.be.dropped,1], coords[to.be.dropped,2], labels=to.be.dropped,
  pos=2, offset=0.3)
sub.col.gal.nb <- subset(col.gal.nb,
  !(1:length(col.gal.nb) %in% to.be.dropped))
plot(sub.col.gal.nb, coords[-to.be.dropped,], col="red", add=TRUE)
which(!(attr(col.gal.nb, "region.id") %in%
  attr(sub.col.gal.nb, "region.id")))

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-18 01:47 , Processed in 0.022159 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表