Extract.psp(spatstat)
Extract.psp()所属R语言包:spatstat
Extract Subset of Line Segment Pattern
提取线段模式的子集
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Extract a subset of a line segment pattern.
提取线段图案的一个子集。
用法----------Usage----------
## S3 method for class 'psp'
x[i, j, drop, ...]
参数----------Arguments----------
参数:x
A two-dimensional line segment pattern. An object of class "psp".
一个二维线段图案。对象的类"psp"。
参数:i
Subset index. Either a valid subset index in the usual R sense, indicating which segments should be retained, or a window (an object of class "owin") delineating a subset of the original observation window.
子集的索引。一个有效的子集索引中的通常的R SENSE,指示应保留的分部,或一个窗口(一个对象的类"owin")划定的一个子集的原始的观察窗。
参数:j
Redundant - included for backward compatibility.
冗余 - 为了向后兼容。
参数:drop
Ignored. Required for compatibility with generic function.
忽略。所需的通用功能的兼容性。
参数:...
Ignored.
忽略。
Details
详细信息----------Details----------
These functions extract a designated subset of a line segment pattern.
这些函数提取线段图案指定的子集。
The function [.psp is a method for [ for the class "psp". It extracts a designated subset of a line segment pattern, either by “thinning” (retaining/deleting some line segments of a line segment pattern) or “trimming” (reducing the window of observation to a smaller subregion and clipping the line segments to this boundary) or both.
函数[.psp是[类"psp"的方法。它提取出指定的线段模式的子集,可以通过“疏”(保留/删去一些线段的线段图案)或“修整”(减少到一个较小的分区域的观察窗口和裁剪线段此边界),或两者。
The pattern will be “thinned” if subset is specified. The line segments designated by subset will be retained. Here subset can be a numeric vector of positive indices (identifying the line segments to be retained), a numeric vector of negative indices (identifying the line segments to be deleted) or a logical vector of length equal to the number of line segments in the line segment pattern x. In the latter case, the line segments for which subset[i]=TRUE will be retained, and the others will be deleted.
该模式将被“薄”,如果subset指定。该行段指定的subset将被保留。这里subset可以是正指数的一个数值向量(识别要保留线段),负指数的一个数值向量(识别要删除的线段)的矢量长度的数目等于或逻辑线段中的线段图案x。在后一种情况下,线段的subset[i]=TRUE将被保留,和其他人都将被删除。
The pattern will be “trimmed” if window is specified. This should be an object of class owin specifying a window of observation to which the line segment pattern x will be trimmed. Line segments of x lying inside the new window will be retained unchanged. Line segments lying partially inside the new window and partially outside it will be clipped so that they lie entirely inside.
该模式将被“减肥”,如果window指定。这应该是一个对象类owin指定的窗口观察到的线段模式x将修整。线段x里面放着新的window将保持不变。线段躺在部分在新的window和部分外,将被剪裁,让他们完全位于内。
Both “thinning” and “trimming” can be performed together.
无论是“疏”和“微调”,可以一起执行。
值----------Value----------
A line segment pattern (of class "psp").
的线段模式(类"psp"“)。
(作者)----------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----------
psp.object, owin.object
psp.object,owin.object
实例----------Examples----------
a <- psp(runif(20),runif(20),runif(20),runif(20), window=owin())
plot(a)
# thinning[细化]
id <- sample(c(TRUE, FALSE), 20, replace=TRUE)
b <- a[id]
plot(b, add=TRUE, lwd=3)
# trimming[微调]
plot(a)
w <- owin(c(0.1,0.7), c(0.2, 0.8))
b <- a[,w]
plot(b, add=TRUE, col="red")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|