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

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

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

                                        Control checking of spatial object IDs
                                         控制检查空间的对象ID

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

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

Provides support for checking the mutual integrity of spatial neighbour weights and spatial data; similar mechanisms are used for passing global verbose and zero.policy options, and for providing access to a running cluster for embarrassingly parallel tasks.
提供的空间邻近的重量和空间数据的完整性检查的相互支持;类似的机制,用于通过全球详细和zero.policy的选项,并提供访问正在运行的聚类尴尬的并行任务。


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


set.spChkOption(check)
get.spChkOption()
chkIDs(x, listw)
spNamedVec(var, data)
set.VerboseOption(check)
get.VerboseOption()
set.ZeroPolicyOption(check)
get.ZeroPolicyOption()
set.ClusterOption(cl)
get.ClusterOption()
set.rlecuyerSeedOption(seed)
get.rlecuyerSeedOption()



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

参数:check
a logical value, TRUE or FALSE
逻辑值TRUE或FALSE


参数:cl
a cluster object created by makeCluster in parallel
聚类对象的makeClusterparallel


参数:seed
an integer vector of length 6 to seed the Lecuyer streams for cluster RNG
一个整数向量长度为6到聚类RNG种子的的Lecuyer流


参数:x
a vector the same length, or a two-dimensional array, or data frame with the same number of rows as the neighbours list in listw
一个向量的长度相同,或一个二维阵列,或数据框的相同的行数作为邻居列表中listw


参数:listw
a listw object or nb object inheriting from "nb"
listw对象或nb对象继承自“NB”


参数:var
a character string or integer value for the column to be selected
被选中的列字符串或整数值


参数:data
a two-dimensional array or data frame containing var
一个两维阵列或数据框包含变种


Details

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

Analysis functions will have an spChk argument by default set to NULL, and will call get.spChkOption() to get the global spatial option for whether to check or not — this is initialised to FALSE, and consequently should not break anything. It can be changed to TRUE using set.spChkOption(TRUE), or the spChk argument can be assigned in analysis functions. spNamedVec() is provided to ensure that rownames are passed on to single columns taken from two-dimensional arrays and data frames.
分析功能将有一个spChk的的参数默认设置为NULL,将调用“get.spChkOption()得到全球空间选择是否检查或不 - 这是初始化为FALSE,因此不会破坏任何东西。它可以改变为TRUE,使用set.spChkOption(TRUE),或的spChk的参数可以被分配在分析功能。 spNamedVec()被提供,以确保行名被传递到从二维阵列和数据框采取的单个列。


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

set.spChkOption() returns the old logical value, get.spChkOption() returns the current logical value, and chkIDs() returns a logical value for the test lack of difference. spNamedVec() returns the selected column with the names set to the row names of the object from which it has been extracted.
set.spChkOption()返回旧的逻辑值,get.spChkOption()返回逻辑值,chkIDs()返回一个逻辑值的测试缺乏差异。 spNamedVec()返回选定的列设置为对象,从它已被提取的行的名称的名称。


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

The motivation for this mechanism is provided by the observation that spatial objects on a map and their attribute data values need to be linked uniquely, to avoid spurious results. The reordering between the legacy Columbus data set used the earlier publications and that available for download from the Spacestat website is just one example of a common problem.
这种机制的动机提供由观察,在图上的空间上的对象和它们的属性数据的值需要唯一联系起来,以避免虚假结果。重新排序之间的传统哥伦布的数据集使用早期的出版物,可用于从Spacestat网站下载的一个共同的问题仅仅是一个例子。


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


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



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


data(oldcol)
rownames(COL.OLD)
data(columbus)
rownames(columbus)
get.spChkOption()
oldChk <- set.spChkOption(TRUE)
get.spChkOption()
chkIDs(COL.OLD, nb2listw(COL.nb))
chkIDs(columbus, nb2listw(col.gal.nb))
chkIDs(columbus, nb2listw(COL.nb))
tmp <- try(moran.test(spNamedVec("CRIME", COL.OLD), nb2listw(COL.nb)))
print(tmp)
tmp <- try(moran.test(spNamedVec("CRIME", columbus), nb2listw(col.gal.nb)))
print(tmp)
tmp <- try(moran.test(spNamedVec("CRIME", columbus), nb2listw(COL.nb)))
print(tmp)
set.spChkOption(FALSE)
get.spChkOption()
moran.test(spNamedVec("CRIME", columbus), nb2listw(COL.nb))
tmp <- try(moran.test(spNamedVec("CRIME", columbus), nb2listw(COL.nb),
spChk=TRUE))
print(tmp)
set.spChkOption(oldChk)
get.spChkOption()

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-18 06:22 , Processed in 0.020132 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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