lut(spatstat)
lut()所属R语言包:spatstat
Lookup Tables
查找表
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Create a lookup table.
创建一个查找表。
用法----------Usage----------
lut(outputs, ..., range=NULL, breaks=NULL, inputs=NULL)
参数----------Arguments----------
参数:outputs
Vector of output values
矢量的输出值
参数:...
Ignored.
忽略。
参数:range
Interval of numbers to be mapped. A numeric vector of length 2, specifying the ends of the range of values to be mapped. Incompatible with breaks or inputs.
间隔的数字映射。长度为2的数值的矢量,指定要被映射的值的范围内的端部。不兼容的breaks或inputs。
参数:inputs
Input values to which the output values are associated. A factor or vector of the same length as outputs. Incompatible with breaks or range.
的输出值的输入值,以相关联的。一个因素或矢量的相同长度的outputs。不兼容的breaks或range。
参数:breaks
Breakpoints for the lookup table. A numeric vector of length equal to length(outputs)+1. Incompatible with range or inputs.
为查找表的断点。一个数字矢量的长度等于length(outputs)+1。不兼容的range或inputs。
Details
详细信息----------Details----------
A lookup table is a function, mapping input values to output values.
查找表是一个函数,映射输入值的输出值。
The command lut creates an object representing a lookup table, which can then be used to control various behaviour in the spatstat package. It can also be used to compute the output value assigned to any input value.
命令lut创建一个对象,它表示一个查找表,然后可以被用来控制各种行为在spatstat的软件包。它也可以被用于计算分配给任何输入值的输出值。
The argument outputs specifies the output values to which input data values will be mapped. It should be a vector of any atomic type (e.g. numeric, logical, character, complex) or factor values.
参数outputs指定的输出值输入数据的值将被映射。这应该是任何原子类型(如数字,逻辑,性格,复杂的)或因子值的向量。
Exactly one of the arguments range, inputs or breaks must be specified by name.
究竟的参数之一range,inputs或breaks必须指定的名称。
If inputs is given, then it should be a vector or factor, of the same length as outputs. The entries of inputs can be any atomic type (e.g. numeric, logical, character, complex) or factor values. The resulting lookup table associates the value inputs[i] with the value outputs[i].
如果inputs给定的,那么它应该是一个向量或因素,相同长度的outputs。 inputs的条目可以是任何原子类型(例如,数字,逻辑,性格,复杂的)因素值。由此产生查找表联营公司的价值inputs[i]值outputs[i]。
If range is given, then it determines the interval of the real number line that will be mapped. It should be a numeric vector of length 2.
range如果,然后确定的实数线将被映射的时间间隔。它应该是一个数值向量的长度为2。
If breaks is given, then it determines intervals of the real number line which are mapped to each output value. It should be a numeric vector, of length at least 2, with entries that are in increasing order. Infinite values are allowed. Any number in the range between breaks[i] and breaks[i+1] will be mapped to the value outputs[i].
如果breaks被给出,则它确定被映射到每个输出值的实数线的间隔。的长度至少为2,它应该是一个数值向量,以递增顺序的条目。无穷大值是允许的。任何数量在breaks[i]和breaks[i+1]将被映射到值outputs[i]之间的范围。
The result is an object of class "lut". There is a print method for this class. Some plot commands in the spatstat package accept an object of this class as a specification of a lookup table.
其结果是一个对象的类"lut"。有一个print这个类的方法。 spatstat包的一些绘图命令接受这个类的对象的查找表作为规范。
The result is also a function f which can be used to compute the output value assigned to any input data value. That is, f(x) returns the output value assigned to x. This also works for vectors of input data values.
其结果是也f它可以被用于计算分配给任何输入数据值的输出值的功能。也就是说,f(x)返回输出值分配给x。这也适用于输入数据值的向量。
值----------Value----------
A function, which is also an object of class "lut".
的功能,这也是一个对象类"lut"。
(作者)----------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----------
colourmap.
colourmap。
实例----------Examples----------
# lookup table for real numbers, using breakpoints[查找表实数,使用断点]
cr <- lut(factor(c("low", "medium", "high")), breaks=c(0,5,10,15))
cr
cr(3.2)
cr(c(3,5,7))
# lookup table for discrete set of values[组离散值的查找表]
ct <- lut(c(0,1), inputs=c(FALSE, TRUE))
ct(TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|