as.owin(spatstat)
as.owin()所属R语言包:spatstat
Convert Data To Class owin
转换类owin数据
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Converts data specifying an observation window in any of several formats, into an object of class "owin".
指定在任何一个观察窗口的几种格式的数据转换,到类"owin"的对象。
用法----------Usage----------
as.owin(W, ..., fatal=TRUE)
## S3 method for class 'owin'
as.owin(W, ..., fatal=TRUE)
## S3 method for class 'ppp'
as.owin(W, ..., fatal=TRUE)
## S3 method for class 'ppm'
as.owin(W, ..., fatal=TRUE)
## S3 method for class 'kppm'
as.owin(W, ..., fatal=TRUE)
## S3 method for class 'lppm'
as.owin(W, ..., fatal=TRUE)
## S3 method for class 'psp'
as.owin(W, ..., fatal=TRUE)
## S3 method for class 'quad'
as.owin(W, ..., fatal=TRUE)
## S3 method for class 'tess'
as.owin(W, ..., fatal=TRUE)
## S3 method for class 'im'
as.owin(W, ..., fatal=TRUE)
## S3 method for class 'gpc.poly'
as.owin(W, ..., fatal=TRUE)
## S3 method for class 'data.frame'
as.owin(W, ..., fatal=TRUE)
## S3 method for class 'distfun'
as.owin(W, ..., fatal=TRUE)
## S3 method for class 'rmhmodel'
as.owin(W, ..., fatal=FALSE)
## Default S3 method:
as.owin(W, ..., fatal=TRUE)
参数----------Arguments----------
参数:W
Data specifying an observation window, in any of several formats described under Details below.
数据指定一个观察窗口,在多种格式的描述在下面的详细信息。
参数:fatal
Logical flag determining what to do if the data cannot be converted to an observation window. See Details.
做什么,如果数据不能被转换到一个观察窗口逻辑标志确定。查看详细信息。
参数:...
Ignored.
忽略。
Details
详细信息----------Details----------
The class "owin" is a way of specifying the observation window for a point pattern. See owin.object for an overview.
类"owin"是一种指定阵列点的观察窗。见owin.object的概述。
This function converts data in any of several formats into an object of class "owin" for use by the spatstat package. The argument W may be
此功能在多种格式的数据转换成一个类的对象"owin"使用spatstat包的。的参数W可能是
an object of class "owin"
一个对象的类"owin"
a structure with entries xrange, yrange specifying the x and y dimensions of a rectangle
项目的结构与xrange,yrange指定x和y尺寸的矩形
a four-element vector (interpreted as (xmin, xmax, ymin, ymax)) specifying the x and y dimensions of a rectangle
指定的(xmin, xmax, ymin, ymax)和x尺寸的矩形的四个元素的向量(解释为y)
a structure with entries xl, xu, yl, yu specifying the x and y dimensions of a rectangle as (xmin, xmax) = (xl, xu) and (ymin, ymax) = (yl, yu). This will accept objects of class spp used in the Venables and Ripley spatial library.
项目的结构与xl,xu,yl,yu指定x和y尺寸的矩形(xmin, xmax) = (xl, xu)和(ymin, ymax) = (yl, yu)。这将接受spp在维纳布尔斯和Ripleyspatial库的类的对象。
an object of class "gpc.poly" from the gpclib package, representing a polygonal window.
类的一个对象"gpc.poly"gpclib包,较多边形窗口。
an object of class "ppp" representing a point pattern. In this case, the object's window structure will be extracted.
对象的类"ppp"的一个点模式。在这种情况下,对象的window结构将被提取。
an object of class "psp" representing a line segment pattern. In this case, the object's window structure will be extracted.
对象的类"psp"线段的模式。在这种情况下,对象的window结构将被提取。
an object of class "tess" representing a tessellation. In this case, the object's window structure will be extracted.
对象类"tess"较镶嵌。在这种情况下,对象的window结构将被提取。
an object of class "quad" representing a quadrature scheme. In this case, the window of the data component will be extracted.
对象的类"quad"正交计划。在这种情况下,窗口的data组件将被提取。
an object of class "im" representing a pixel image. In this case, a window of type "mask" will be returned, with the same pixel raster coordinates as the image. An image pixel value of NA, signifying that the pixel lies outside the window, is transformed into the logical value FALSE, which is the corresponding convention for window masks.
一个对象的类"im"代表一个像素的图像。在这种情况下,一个窗口的类型"mask"将被返回,与相同的像素作为图像的栅格坐标。一种图像的像素值,NA,表示该象素在于窗外,转化为逻辑值FALSE,是对应哪个窗口口罩公约。
an object of class "ppm" or "kppm" representing a fitted point process model. In this case, as.owin extracts the original point pattern data to which the model was fitted, and returns the observation window of this point pattern.
类的一个对象"ppm"或"kppm"的一个装有点进程模型。在这种情况下,as.owin提取原来的点图案数据的模型拟合,并返回这点图案的观察窗。
an object of class "lppm" representing a fitted point process model on a linear network. In this case, as.owin extracts the linear network and returns a window containing this network.
类的一个对象"lppm"的一个装有点过程模型的线性网络。在这种情况下,as.owin提取的线性网络,并返回包含该网络的窗口。
A data.frame with exactly three columns. Each row of the data frame corresponds to one pixel. Each row contains the x and y coordinates of a pixel, and a logical value indicating whether the pixel lies inside the window.
Adata.frame整整三列。的数据框的每行对应于一个像素。每一行都包含x和y的像素的坐标,和一个逻辑值,该值指示是否位于窗口内的像素。
an object of class "distfun" representing a distance function. The spatial domain of the function will be extracted.
一个对象的类"distfun"的距离函数。将被提取的功能的空间域。
an object of class "rmhmodel" representing a point process model that can be simulated using rmh. The window (spatial domain) of the model will be extracted. The window may be NULL in some circumstances (indicating that the simulation window has not yet been determined). This is not treated as an error, because the argument fatal defaults to FALSE for this method.
类的一个对象"rmhmodel"代表一个点过程模型,可以模拟使用rmh。 (空间域)的模型的窗口将被提取。窗口可以是NULL在某些情况下,(指示尚未确定,该仿真窗口)。这不被视为一个错误,因为参数fatal默认FALSE这个方法。
If the argument W is not in one of these formats and cannot be converted to a window, then an error will be generated (if fatal=TRUE) or a value of NULL will be returned (if fatal=FALSE).
如果参数W在这些格式之一,并不能转换为一个窗口,然后将产生的错误(如果fatal=TRUE)或值为NULL将返回(如果fatal=FALSE“)。
The function as.owin is generic, with methods for "owin", "im" and "ppp" as well as the default method.
函数as.owin是通用的,"owin","im"和"ppp"以及默认的方法的方法。
值----------Value----------
An object of class "owin" (see owin.object) specifying an observation window.
类的一个对象"owin"(owin.object)指定的观察窗口。
(作者)----------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----------
owin.object, owin
owin.object,owin
实例----------Examples----------
w <- as.owin(c(0,1,0,1))
w <- as.owin(list(xrange=c(0,5),yrange=c(0,10)))
# point pattern[点模式]
data(demopat)
w <- as.owin(demopat)
# image[图像]
Z <- as.im(function(x,y) { x + 3}, unit.square())
w <- as.owin(Z)
# Venables & Ripley 'spatial' package[维纳布尔斯Ripley的空间,包]
require(spatial)
towns <- ppinit("towns.dat")
w <- as.owin(towns)
detach(package:spatial)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|