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

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

[复制链接]
发表于 2012-9-30 00:02:17 | 显示全部楼层 |阅读模式
randomHabitat(secr)
randomHabitat()所属R语言包:secr

                                        Random Landscape
                                         随机景观

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

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

The Modified Random Cluster algorithm of Saura and Martinez-Millan (2000) is used to generate a mask object representing patches of contiguous "habitat" cells (pixels) within a "non-habitat" matrix ("non-habitat" cells are optionally dropped). Spatial autocorrelation (fragmentation) of habitat patches is controlled via the parameter "p". "A" is the expected proportion of "habitat" cells.
绍拉和马丁内斯 - 米伦(2000)随机整群算法的改进是用来产生遮罩对象代表连续的“栖息地”单元(像素)的补丁内“非栖息地”矩阵(非栖息地的单元有选择性地丢弃)。空间自相关(碎片)的栖息地斑块是通过控制参数“P”。 A是预期的“栖息地”单元比例。


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



randomHabitat(mask, p = 0.5, A = 0.5, directions = 4, minpatch = 1,
drop = TRUE, covname = "habitat", plt = FALSE)




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

参数:mask
secr mask object to use as template
秘书服务口罩对象作为模板


参数:p
parameter to control fragmentation
参数控制碎片


参数:A
parameter for expected proportion of habitat
参数预期的栖息地比例


参数:directions
integer code for adjacency (rook's move 4 or queen's move 8)
为相邻的整数代码(车的举动或女王的举动8)


参数:minpatch
integer minimum size of patch
整数的最小尺寸补丁


参数:drop
logical for whether to drop non-habitat cells
逻辑,是否删除非栖息地的单元


参数:covname
character name of covariate when drop = FALSE
协变量的字符名称时drop = FALSE


参数:plt
logical for whether intermediate stages should be plotted
符合逻辑的中间阶段是否应绘制


Details

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

Habitat is simulated within the region defined by the cells of mask. The region may be non-rectangular.
生境是模拟在由单元掩模限定的区域内。该区域可以是非矩形。

The algorithm comprises stages A-D:
该算法包括A-D阶段:

A. Randomly select proportion p of cells from the input mask
A.随机选择比例p单元的输入掩码

B. Cluster selected cells with any immediate neighbours as defined by directions
B.聚类选定的单元格与近邻定义的directions

C. Assign clusters to "non-habitat" (probability 1–A) and "habitat" (probability A)
C.分配给聚类“非栖息地”(概率为1-A)和“栖息地”(概率A)

D. Cells not in any cluster from (B) receive the habitat class of the majority of the <=8 adjacent cells assigned in (C), if there are any; otherwise they are assigned at random (with probabilities 1&ndash;A, A).
D.单元没有任何聚类(B)收到的大部分栖息地级<= 8的分配相邻的单元格中(C),如果有任何,否则会被随机分配的(1-A的概率, A)。

Fragmentation declines, and cluster size increases, as p increases up to the "percolation threshold" which is about 0.59 in the default case (Saura and Martinez-Millan 2000 p.664).
碎片下降,和簇大小的增加,为p上升至“渗滤阈值”,这是在默认情况下(绍拉和马丁内斯文澜2000 p.664)约0.59。

If minpatch > 1 then habitat patches of less than minpatch cells are converted to non-habitat, and vice versa. This is likely to cause the proportion of habitat to deviate from A.
如果minpatch > 1然后栖息地斑块小于minpatch单元转换成非栖息地,反之亦然。这可能是造成栖息地的比例偏离A。

If drop = FALSE a binary-valued (0/1) covariate with the requested name is included in the output mask, which has the same extent as the input. Otherwise, non-habitat cells are dropped and no covariate is added.
如果drop = FALSE一个二进制值(0/1),协变量包括在与被请求的名称输出掩模,它具有作为输入的相同的程度。否则,非栖息地的电池被丢弃,没有添加协变量。


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

An object of class "mask". By default (covariate = FALSE) this has fewer rows (points) than the input mask.
对象类的“面具”。默认情况下(covariate = FALSE)有更少的行(点)比输入掩码。


----------Note----------

Single-linkage clustering and adjacency operations use functions "clump" and "adjacency" of the package raster; "clump" also requires package igraph. Optional plotting of intermediate stages (plt = TRUE) uses the plot method for rasterLayers in raster.
单杆聚类和邻接操作使用功能“丛”和“邻接的包raster;丛”也要求包igraph。可选的绘制中间阶段(plt = TRUE)使用的图在rasterrasterLayers方法。

A non-rectangular input mask is padded out to a rectangular rasterLayer for operations in raster; cells added as padding are ultimately dropped.
一个非矩形的输入掩码填充一个矩形rasterLayer,的操作raster;单元增加一条,作为填充最终下降。

The procedure of Saura and Martinez-Millan (2000) has been followed as far as possible, but this implementation may not match theirs in every detail.
绍拉的程序和马丁内斯 - 米伦(2000)已尽可能遵循,但这种实现可能不符合他们的每一个细节。

This implementation allows only two habitat classes. The parameter A is the expected value of the habitat proportion; the realised habitat proportion may differ quite strongly from A, especially for large p (e.g., p > 0.5).
此实现只允许两个栖息地类。参数A是预期值的栖息地比例,实现栖息地的比例可能会有所不同从一个相当强烈,尤其是对大P(例如,p> 0.5)。

Anisotropy is not implemented; it would require skewed adjacency filters (i.e. other than rook- or queen-move filters) that are not available in raster.
各向异性没有实现,那将需要的倾斜的邻接过滤器(即于车或王后移动的滤光镜),在raster。


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

modeling with raster data. R package version 1.9-33. http://CRAN.R-project.org/package=raster.
with a modified random clusters method. Landscape Ecology, 15, 661&ndash;678.

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

mask, make.mask, sim.popn
mask,make.mask,sim.popn


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



## Not run: [#不运行:]

tempmask <- make.mask(nx = 100, ny = 100, spacing = 20)
mrcmask <- randomHabitat(tempmask, p = 0.4, A = 0.4)
plot(mrcmask, dots = FALSE, col = "green")
pop <- sim.popn(10, mrcmask, model2D = "IHP")
plot(pop, add = TRUE)

## plot intermediate steps A, C, D[#图的中间步骤A,C,D]
opar <- par(mfrow = c(1,3))
mrcmask <- randomHabitat(tempmask, p = 0.4, A = 0.4, plt = TRUE)
par(opar)

## keep non-habitat cells[#非栖息地保持单元]
mrcmask <- randomHabitat(tempmask, p = 0.4, A = 0.4, drop = FALSE)
plot(mrcmask, covariate = "habitat", dots = FALSE,
    col = c("grey","green"), breaks = 2)

## effect of purging small patches[#清除小补丁的效果]
opar <- par(mfrow=c(1,2))
mrcmask <- randomHabitat(tempmask, p = 0.4, A = 0.4, minpatch = 1)
plot(mrcmask, dots = FALSE, col  ="green")
mrcmask <- randomHabitat(tempmask, p = 0.4, A = 0.4, minpatch = 5)
plot(mrcmask, dots = FALSE, col  ="green")
par(opar)

## End(Not run)[#(不执行)]


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-30 12:49 , Processed in 0.019844 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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