rshift.psp(spatstat)
rshift.psp()所属R语言包:spatstat
Randomly Shift a Line Segment Pattern
随机移动直线段模式
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Randomly shifts the segments in a line segment pattern.
随机移位段线段图案。
用法----------Usage----------
## S3 method for class 'psp'
rshift(X, ..., group=NULL, which=NULL)
参数----------Arguments----------
参数:X
Line segment pattern to be subjected to a random shift. An object of class "psp".
线段图案进行随机移位。对象的类"psp"。
参数:...
Arguments controlling the randomisation and the handling of edge effects. See rshift.ppp.
随机参数控制和处理边缘效应。见rshift.ppp。
参数:group
Optional. Factor specifying a grouping of the line segments of X, or NULL indicating that all line segments belong to the same group. Each group will be shifted together, and separately from other groups.
可选。因素确定X或NULL表明所有线段属于同一组的线段的一个分组。每个小组将移位到一起,并分别从其他组。
参数:which
Optional. Identifies which groups of the pattern will be shifted, while other groups are not shifted. A vector of levels of group.
可选。标识的格局将被转移组,而其它组无法移动。的向量水平group。
Details
详细信息----------Details----------
This operation randomly shifts the locations of the line segments in a line segment pattern.
此操作随机移动的位置的线段中的线段图案。
The function rshift is generic. This function rshift.psp is the method for line segment patterns.
函数rshift是通用的。此功能rshift.psp是线段模式的方法。
The line segments of X are first divided into groups, then the line segments within a group are shifted by a common random displacement vector. Different groups of line segments are shifted independently. If the argument group is present, then this determines the grouping. Otherwise, all line segments belong to a single group.
线段X首先被分成组,然后由一个共同的随机位移矢量的线段组内的偏移。不同组的线段独立错开。如果参数group存在,那么这个决定分组。否则,所有的线段属于一个组。
The argument group should be a factor, of length equal to the number of line segments in X. Alternatively group may be NULL, which specifies that all line segments of X belong to a single group.
参数group应该是一个因素,长度等于线段数在X。或者group是NULL,其中规定,所有线段X属于一个组。
By default, every group of line segments will be shifted. The argument which indicates that only some of the groups should be shifted, while other groups should be left unchanged. which must be a vector of levels of group indicating which groups are to be shifted.
默认情况下,每个组的线段将被转移。参数which表明,只有一些的群体转移,而其它组应保持不变。 which必须是一个矢量的水平group表示的基团是被移位。
The displacement vector, i.e. the vector by which the data line segments are shifted, is generated at random. The default behaviour is to generate a displacement vector at random with equal probability for all possible displacements. This means that the x and y coordinates of the displacement vector are independent random variables, uniformly distributed over the range of possible coordinates.
的位移矢量,即其中的数据的线段被移位的矢量,是随机生成的。默认的行为是随机的概率是相同的所有可能的位移产生的位移矢量。这意味着,x和y是独立随机变量,可能的坐标的范围内均匀地分布在坐标的位移矢量。
Alternatively, the displacement vector can be generated by another random mechanism, controlled by the arguments radius, width and height.
或者,位移矢量可以由另一个随机机制产生,由参数控制radius,width和height。
if width and height are given, then the displacement vector is uniformly distributed in a rectangle of these dimensions, centred at the origin. The maximum possible displacement in the x direction is width/2. The maximum possible displacement in the y direction is height/2. The x and y displacements are independent. (If width and height are actually equal to the dimensions of the observation window, then this is equivalent to the default.)
如果width和height给出的位移矢量均匀分布在这些尺寸的矩形,中心在原点。最大可能的位移x方向是width/2。最大可能的位移y方向是height/2。 x和y位移独立。 (如果width和height实际上等于观察窗的尺寸,那么这相当于默认)。
if radius is given, then the displacement vector is generated by choosing a random line segment inside a disc of the given radius, centred at the origin, with uniform probability density over the disc. Thus the argument radius determines the maximum possible displacement distance. The argument radius is incompatible with the arguments width and height.
如果radius,然后给出的位移矢量所产生的给定的半径,以原点为中心,具有均匀概率密度在盘内的盘选择一个随机的线段。这样的话,radius确定可能的最大位移距离。参数radius是不兼容的参数width和height。
The argument edge controls what happens when a shifted line segment lies partially or completely outside the window of X. Currently the only option is "erode" which specifies that the segments will be clipped to a smaller window.
参数edge控制会发生什么事时移线段部分或完全在于窗外的X。目前,唯一的选择就是"erode"指定的段将被剪切到一个较小的窗口。
The optional argument clip specifies a smaller window to which the pattern should be restricted.
可选参数clip指定一个较小的窗口模式应该加以限制。
值----------Value----------
A line segment pattern (object 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----------
rshift, rshift.ppp
rshift,rshift.ppp
实例----------Examples----------
X <- psp(runif(20), runif(20), runif(20), runif(20), window=owin())
Y <- rshift(X, radius=0.1)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|