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

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

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

                                        Read and write spatial neighbour files
                                         读取和写入空间的邻居文件

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

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

The "gwt" functions read and write GeoDa GWT files (the example file baltk4.GWT was downloaded from the site given in the reference), and the "dat" functions read and write Matlab sparse matrix files as used by James LeSage's Spatial Econometrics Toolbox (the example file wmat.dat was downloaded from the site given in the reference). The body of the files after any headers should have three columns separated by white space, and the third column must be numeric in the locale of the reading platform (correct decimal separator).
“的gwt”功能读取和写入GeoDa GWT文件(例如文件baltk4.GWT中给出的参考从网站上下载的),和“dat”的功能,读取和写入matlab的稀疏矩阵中所用的文件由詹姆斯LESAGE的空间计量经济学工具箱(例如文件wmat.dat的下载网站的参考)。身体的任何头文件后,应该有三个由空格分隔的列,第三列必须是数字阅读平台(正确的小数点分隔符)的语言环境中。


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


read.gwt2nb(file, region.id=NULL)
write.sn2gwt(sn, file, shpfile=NULL, ind=NULL, useInd=FALSE, legacy=FALSE)
read.dat2listw(file)
write.sn2dat(sn, file)



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

参数:file
name of file with weights data
重量数据的文件名


参数:region.id
region IDs
区域标识


参数:sn
a spatial.neighbour object
spatial.neighbour对象


参数:shpfile
character string: if not given Shapefile name taken from GWT file for this dataset
字符串:如果没有给出该数据集的Shapefile从GWT文件的名称


参数:ind
character string: region id indicator field name
字符串:区域ID指示灯的字段名称


参数:useInd
default FALSE, if TRUE, write region.id attribute ID key tags to output file (use in OpenGeoDa will depend on the shapefile having the field named in the ind argument matching the exported tags)
默认是false,如果为TRUE,写region.id属性ID标签输出文件(使用在OpenGeoDa将依赖的shapefile字段名为ind参数相匹配的出口标签)


参数:legacy
default FALSE; if TRUE, header has single field with number of observations only
默认为false;如果为TRUE,头有单场若干意见


Details

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

Now attempts to honour the region.id argument given when reading GWT files.
现在会尝试荣誉的region.id的参数阅读GWT文件时。


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

read.gwt2nb returns a neighbour "nb" object with the generalised weights stored as a list element called "dlist" of the "GeoDa" attribute.
read.gwt2nb返回邻居“NB”的广义对象存储为一个列表中的元素被称为“DLIST”的“GeoDa”属性的权重。


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


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



参考文献----------References----------

<h3>See Also</h3>

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


data(baltimore)
STATION <- baltimore$STATION
gwt1 <- read.gwt2nb(system.file("etc/weights/baltk4.GWT", package="spdep")[1],
STATION)
cat(paste("Neighbours list symmetry;", is.symmetric.nb(gwt1, FALSE, TRUE),
"\n"))
listw1 <- nb2listw(gwt1, style="B", glist=attr(gwt1, "GeoDa")$dist)
tmpGWT <- tempfile()
write.sn2gwt(listw2sn(listw1), tmpGWT)
gwt2 <- read.gwt2nb(tmpGWT, STATION)
cat(paste("Neighbours list symmetry;", is.symmetric.nb(gwt2, FALSE, TRUE),
"\n"))
diffnb(gwt1, gwt2)
data(oldcol)
tmpMAT <- tempfile()
COL.W <- nb2listw(COL.nb)
write.sn2dat(listw2sn(COL.W), tmpMAT)
listwmat1 <- read.dat2listw(tmpMAT)
diffnb(listwmat1$neighbours, COL.nb, verbose=TRUE)
listwmat2 <- read.dat2listw(system.file("etc/weights/wmat.dat",
package="spdep")[1])
diffnb(listwmat1$neighbours, listwmat2$neighbours, verbose=TRUE)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-18 06:40 , Processed in 0.026953 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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