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

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

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

                                        Superimpose Several Geometric Patterns
                                         叠加几个几何图案

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

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

Superimpose any number of point patterns or line segment patterns.
叠加任意数量的点图案或线段模式。


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


  superimpose(...)
  ## S3 method for class 'ppp'
superimpose(..., W=NULL, check=TRUE)
  ## S3 method for class 'psp'
superimpose(..., W=NULL, check=TRUE)
  ## Default S3 method:
superimpose(..., W=NULL, check=TRUE)



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

参数:...
Any number of arguments, each of which represents either a point pattern or a line segment pattern.   
任何数量的参数,其中每一个代表点图案或线段图案。


参数:W
Optional. Data determining the window for the resulting pattern. Either a window (object of class "owin", or something acceptable to as.owin), or a function which returns a window, or one of the strings "convex", "rectangle", "bbox" or "none".  
可选。数据确定窗口的模式。无论是一个窗口(对象类"owin",或as.owin),或一个函数,它返回一个窗口,其中一个字符串接受的东西"convex","rectangle", "bbox"或"none"。


参数:check
Logical value (passed to ppp or psp as appropriate) determining whether to check the geometrical validity of the resulting pattern.  
逻辑值传递给ppp或psp适当确定是否检查几何的模式的有效性。


Details

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

This function is used to superimpose several geometric patterns of the same kind, producing a single pattern of the same kind.
使用此功能的同类叠加的几何图案,生产同一种单一的模式。

The function superimpose is generic, with methods for the class ppp of point patterns, the class psp of line segment patterns, and a default method. The dispatch to a  method is determined by the class of the first argument in ....
函数superimpose是通用的,方法的类ppp点模式,类psp的线段的模式,和一个默认的方法。调度的方法是由类的第一个参数...。

default:  If the first argument is  not an object of class ppp or psp, then the default method superimpose.default is executed. All arguments in ... must have components x and y representing spatial coordinates. They may include objects of class ppp. The result will be either a list(x,y) or a point pattern (objects of class ppp) as explained below.
default:如果第一个参数是类的一个对象ppp或psp,然后默认的方法superimpose.default执行。所有的参数在...必须有组件x和y表示空间坐标。他们可能包括对象的类ppp。其结果将是一个list(x,y)或点模式(类的对象ppp),解释如下。

ppp: If the first ... argument is an object of class ppp then the method superimpose.ppp is executed. All arguments in ... must be either ppp objects or lists with components x and y. The result will be an object of class ppp.
ppp:如果第一个...参数是类的一个对象ppp然后方法superimpose.ppp执行。 ...的所有参数必须是ppp对象或列表的组件x和y。其结果将是一个对象类ppp。

psp: If the first ... argument is an object of class psp then the psp method is dispatched and all ... arguments must be psp objects. The result is a psp object.
PSP:如果第一个...参数是类的一个对象psp然后psp方法的派遣所有的...参数必须是psp对象的。其结果是psp对象。

The patterns are not required to have the same window of observation.
不是必需的,图案的观察到具有相同的窗口。

The window for the superimposed pattern is controlled by the argument W.
叠加图案的窗口控制的参数W。

If W is a window (object of class "W" or something acceptable to as.owin) then this determines the window for the superimposed pattern.
如果W是一个窗口(对象类"W"或可以接受的东西as.owin),这决定了窗口的叠加模式。

If W is NULL, or the character string "none", then windows are extracted from the geometric patterns, as follows.  For superimpose.psp, all arguments ... are line segment patterns (objects of class "psp"); their observation windows are extracted; the union of these windows is computed; and this union is taken to be the window for the superimposed pattern. For superimpose.ppp and superimpose.default, the arguments ... are inspected, and  any arguments which are point patterns (objects of class "ppp") are selected; their observation windows are extracted, and the union of these windows is taken to be the window for the superimposed point pattern. For superimpose.default if none of the arguments is of class "ppp" then no window is computed and the result of superimpose is a list(x,y).
如果W是NULL,或字符串"none",然后在Windows中提取的几何图案,如下。对于superimpose.psp,所有参数...是线段模式(类的对象"psp");提取的观察窗,这些窗口计算的工会和工会采取叠加模式的窗口。对于superimpose.ppp和superimpose.default,参数...检查,并点模式(类的对象的任何参数"ppp")被选中,他们的观察窗中提取,并工会采取这些窗口的窗口叠加模式。对于superimpose.default,如果没有一个参数是类的"ppp"然后没有窗户的计算和的结果superimpose是list(x,y)。

If W is one of the strings "convex", "rectangle" or "bbox" then a window for the superimposed pattern is computed from the coordinates of the points or the line segments as follows.
如果W是一个字符串,"convex","rectangle"或"bbox"然后一个窗口,用于叠加的图案是从如下的点或线段的坐标计算。




"bbox": the bounding box of the
"bbox":边界框




"convex": the Ripley-Rasson estimator
"convex":里普利的Rasson的估计




"rectangle": the Ripley-Rasson estimator of a rectangular window (using ripras with argument
"rectangle":的里普利,Rasson的估计的矩形窗口(使用ripras参数

If W is a function, then this function is used to compute a window for the superimposed pattern from the coordinates of the points or the line segments. The function should accept input of the form list(x,y) and is expected to return an object of class "owin". Examples of such functions are ripras and bounding.box.xy.
如果W是一个函数,那么该功能被用来计算一个窗口的重叠图案的点或线段的坐标。该函数应该接受输入的形式list(x,y),并返回一个对象类"owin"。这种功能的例子是ripras和bounding.box.xy。

The arguments ... may be marked patterns. The marks of each component pattern must have the same format. Numeric and character marks may be “mixed”.  If there is such mixing then the numeric marks are coerced to character in the combining process. If the mark structures are all data frames, then these data frames must have the same number of columns and identical column names.
的参数...可能会被标记模式。每个组件图案的标记必须具有相同的格式。数字和字符的标记可能是“混合”。如果有这样的混合,然后在合成过程中的数字标记被强制为字符。如果标记结构是所有的数据框,那么这些数据框必须有相同数目的列和列名相同。

If the arguments ... are given in the form name=value, then the names will be used as an extra column of marks attached to the elements of the corresponding patterns.
如果参数...给出的形式name=value,然后names将被作为一个额外的列的标记附加到相应的图案的元素。


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

For superimpose.ppp, a point pattern (object of class "ppp"). For superimpose.default, either a point pattern (object of class "ppp") or a list(x,y). For superimpose.psp, a line segment pattern (object of class "psp").
对于superimpose.ppp,点模式(对象类"ppp")。对于superimpose.default,无论是点模式(类"ppp")或list(x,y)对象。对于superimpose.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----------

concatxy, quadscheme.
concatxy,quadscheme。


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


  # superimposing point patterns[叠加点模式]
  p1  <- runifrect(30)
  p2  <- runifrect(42)
  s1  &lt;- superimpose(p1,p2) # Unmarked pattern.[无人盯防的模式。]
  p3  <- list(x=rnorm(20),y=rnorm(20))
  s2  &lt;- superimpose(p3,p2,p1) # Default method gets called.[默认方法被调用。]
  s2a &lt;- superimpose(p1,p2,p3) # Same as s2 except for order of points.[S2除了点顺序相同。]
  s3  &lt;- superimpose(clyde=p1,irving=p2) # Marked pattern; marks a factor[标记模式,标志着因素]
                                         # with levels "clyde" and "irving";[“克莱德”和“欧文”水平;]
                                         # warning given.[发出的警告。]
  marks(p1) <- factor(sample(LETTERS[1:3],30,TRUE))
  marks(p2) <- factor(sample(LETTERS[1:3],42,TRUE))
  s5  &lt;- superimpose(clyde=p1,irving=p2) # Marked pattern with extra column[额外的列标记模式]
  marks(p2) <- data.frame(a=marks(p2),b=runif(42))
  s6  &lt;- try(superimpose(p1,p2)) # Gives an error.[给出了一个错误。]
  marks(p1) <- data.frame(a=marks(p1),b=1:30)
  s7  &lt;- superimpose(p1,p2) # O.K.[好吧。]

  # how to make a 2-type point pattern with types "a" and "b"[如何使一个2  - 型的点模式的类型的“a”和“b”]
  u <- superimpose(a = rpoispp(10), b = rpoispp(20))

  # how to make a 2-type point pattern with types 1 and 2[如何使2-1型和2型点模式]
  u <- superimpose("1" = rpoispp(10), "2" = rpoispp(20))

  # superimposing line segment patterns[叠加线段模式]
  X <- rpoisline(10)
  Y <- as.psp(matrix(runif(40), 10, 4), window=owin())
  Z <- superimpose(X, Y)

  # being unreasonable[是不合理的]
  ## Not run: [#不运行:]
  crud &lt;- superimpose(p1,p2,X,Y) # Gives an error, of course![给出了一个错误,当然!]
  
## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-17 06:21 , Processed in 0.032931 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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