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

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

[复制链接]
发表于 2012-9-30 13:24:01 | 显示全部楼层 |阅读模式
discretise(spatstat)
discretise()所属R语言包:spatstat

                                         Safely Convert Point Pattern Window to Binary Mask
                                         安全转换点模式窗口二进制面膜

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

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

Given a point pattern, discretise its window by converting it to a binary pixel mask, adjusting the mask so that it still contains all the points.
给定一个模式,将其转换为一个二进制的像素遮罩,调整口罩,以便它仍然包含了所有的点离散的窗口。


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


  discretise(X, eps = NULL, dimyx = NULL, xy = NULL)



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

参数:X
A point pattern (object of class "ppp") to be converted.
点模式(类的对象"ppp")进行转换。


参数:eps
(optional) width and height of each pixel
(可选)的各像素的宽度和高度


参数:dimyx
(optional) pixel array dimensions
(可选)像素阵列尺寸


参数:xy
(optional) pixel coordinates
(可选)像素坐标


Details

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

This function modifies the point pattern X by converting its observation window X$window to a binary pixel image (a window of type "mask"). It ensures that no points of X are deleted by the discretisation.
此功能修改点模式X的观察窗X$window转换为二进制的像素的图像(一个窗口类型"mask")。确保没有点X被删除的离散。

The window is first discretised using as.mask.  It can happen that points of X that were inside the original window may fall outside the new mask. The discretise function corrects this by augmenting the mask (so that the mask includes any pixel that contains a point of the pattern).
该窗口第一次离散化使用as.mask。它可以发生点X原来的窗口内可能不属于新的掩码。 discretise函数纠正此通过扩充掩模(使掩模包括任何包含的点的图案的像素)。

The arguments eps, dimyx and xy control the fineness of the pixel array. They are passed to as.mask.
的参数eps,dimyx和xy控制细度的像素阵列。他们传递给as.mask。

If eps, dimyx and xy are all absent or NULL, and if the window of X is of type "mask" to start with, then discretise(X) returns X unchanged.
如果eps,dimyx和xy都没有或NULL X,如果窗口是类型"mask"开始,然后discretise(X)返回X不变。

See as.mask for further details about the arguments eps, dimyx, and xy, and the process of converting a window to one of type mask.
as.mask的论点作进一步的详细信息eps,dimyx,xy,和转换的过程中,一个窗口一个类型mask。


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

A point pattern (object of class "ppp"), identical to X, except that its observation window has been converted to one of type mask.
点模式(对象类"ppp")相同X,除了它的观察窗已被转换成一个类型mask。


错误检查----------Error checking----------

Before doing anything, discretise checks that all the points of the pattern are actually inside the original window.  This is guaranteed to be the case if the pattern was constructed using ppp or as.ppp. However anomalies are possible if the point pattern was created or manipulated inappropriately. These will cause an error.
在做任何事情之前,discretise检查所有点的模式实际上是原来的窗口内。这是保证的情况下,如果该模式使用ppp或as.ppp。但是异常点模式是可能的,如果不恰当地创建或操纵的。这将导致一个错误。


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


Adrian Baddeley
<a href="mailto:Adrian.Baddeley@csiro.au">Adrian.Baddeley@csiro.au</a>
<a href="http://www.maths.uwa.edu.au/~adrian/">http://www.maths.uwa.edu.au/~adrian/</a>
and Rolf Turner
<a href="mailto:r.turner@auckland.ac.nz">r.turner@auckland.ac.nz</a>




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

as.mask
as.mask


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


  data(demopat)
  X <- demopat
  plot(X, main="original pattern")
  Y <- discretise(X, dimyx=50)
  plot(Y, main="discretise(X)")
  stopifnot(X$n == Y$n)

  # what happens if we just convert the window to a mask?[如果我们只是转换的窗口口罩,会发生什么?]
  W <- X$window
  M <- as.mask(W, dimyx=50)
  plot(M, main="window of X converted to mask")
  plot(X, add=TRUE, pch=16)
  plot(X[M], add=TRUE, pch=1, cex=1.5)
  XM <- X[M]
  cat(paste(X$n - XM$n, "points of X lie outside M\n"))

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-15 01:26 , Processed in 0.019745 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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