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

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

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

                                        Use arc-type shapefiles for import and export of weights
                                         使用弧线型的shapefile用于进口和出口的权重

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

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

Use arc-type shapefiles for import and export of weights, storing spatial entity coordinates in the arcs, and the entity indices in the data frame.
使用弧线型的shapefile用于进口和出口权重,存储空间实体坐标系中的弧,并在数据框中的实体指数。


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


nb2lines(nb, wts, coords, proj4string=CRS(as.character(NA)))
listw2lines(listw, coords, proj4string=CRS(as.character(NA)))
df2sn(df, i="i", i_ID="i_ID", j="j", wt="wt")



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

参数:nb
a neighbour object of class nb
邻居对象的类nb


参数:wts
list of general weights corresponding to neighbours
一般的权重对应的邻居列表


参数:coords
matrix of region point coordinates
区域点的坐标矩阵


参数:proj4string
Object of class CRS; holding a valid proj4 string
CRS类对象,持有有效的proj4的字符串


参数:listw
a listw object of spatial weights
listw对象的空间权重


参数:df
a data frame read from a shapefile, derived from the output of nb2lines
从shapefile的读取一个数据框,的输出nb2lines得到


参数:i
character name of column in df with from entity index
从实体指数字符的名称列在DF


参数:i_ID
character name of column in df with from entity region ID
从实体区域ID字符的名称列在DF


参数:j
character name of column in df with to entity index
字符的名称列在DF与实体指数


参数:wt
character name of column in df with weights
列中的字符的名称与重量的DF


Details

详细信息----------Details----------

The maptools package function writeSpatialShape is used to transport out the list of lines made by nb2lines or listw2lines, which is a simple wrapper function. The neighbour and weights objects may be retrieved by converting the specified columns of the data slot of the SpatialLinesDataFrame object into a spatial.neighbour object, which is then converted into a weights list object.
maptools包功能writeSpatialShape运输线nb2lines或listw2lines,这是一个简单的包装功能的列表。邻居和重量对象可以检索通过转换成spatial.neighbour对象,然后被转换成一个的权重列表对象的指定的列的数据时隙的SpatialLinesDataFrame对象。


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

nb2lines and listw2lines return a SpatialLinesDataFrame object; its data slot contains a data frame with the from and to indices of the neighbour links and their weights. df2sn converts the data retrieved from reading the data from df back into a spatial.neighbour object.
nb2lines和listw2lines返回一个SpatialLinesDataFrame的对象,其数据插槽中插入一个数据框和邻居的链接及其权重指数。 df2sn将检索到的数据读取数据df回spatial.neighbour对象。


注意----------Note----------

Original idea due to Gidske Leknes Andersen, Department of Biology, University of Bergen, Norway
由于Gidske莱克内斯安徒生,挪威卑尔根大学生物系,最初的想法


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


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



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

sn2listw, readShapeLines
sn2listw,readShapeLines


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


example(columbus)
coords <- coordinates(columbus)
res <- listw2lines(nb2listw(col.gal.nb), coords)
summary(res)
fn <- paste(tempdir(), "nbshape", sep="/")
writeLinesShape(res, fn=fn)
inMap <- readShapeLines(fn)
summary(inMap)
diffnb(sn2listw(df2sn(as(inMap, "data.frame")))$neighbours, col.gal.nb)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-18 01:55 , Processed in 0.046137 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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