outer(sets)
outer()所属R语言包:sets
Outer Product of Sets (Tuples)
外积集(数组)
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Outer “product” of (g)sets (tuples).
(g)列出的“产品”外(元组)。
用法----------Usage----------
set_outer(X, Y, FUN = "*", ..., SIMPLIFY = TRUE, quote = FALSE)
gset_outer(X, Y, FUN = "*", ..., SIMPLIFY = TRUE, quote = FALSE)
cset_outer(X, Y, FUN = "*", ..., SIMPLIFY = TRUE, quote = FALSE)
tuple_outer(X, Y, FUN = "*", ..., SIMPLIFY = TRUE, quote = FALSE)
参数----------Arguments----------
参数:X, Y
Set (tuple) objects or vectors. If Y is omitted, X will be used instead. In this case, FUN can also be specified as Y for convenience.
设置对象(数组)或向量。 Y如果被省略,X使用。在这种情况下,FUN也可以被指定为Y为方便起见。
参数:FUN
A function or function name (character string).
一个函数或函数名(字符串)。
参数:SIMPLIFY
Logical. If TRUE and all return values of FUN are atomic and of length 1, the result will be an atomic matrix; otherwise, a recursive one (a list with dim attribute).
逻辑。如果TRUE和所有返回值FUN是原子的长度为1,结果将是一个原子矩阵,否则,一个递归(dim属性的列表)。
参数:quote
logical indicating whether the character strings used for the row and column names of the returned matrix should be quoted.
逻辑是否应该被引用的字符串用于返回的矩阵的行和列的名字。
参数:...
Additional arguments passed to the FUN.
额外的参数传递给FUN。
Details
详细信息----------Details----------
This function applies FUN to all pairs of elements specified in X and Y. Basically intended as a replacement for outer for sets (tuples), it will also accept any vector for X and Y. The return value will be a matrix of dimension length(X) times length(Y), atomic or recursive depending on the complexity of FUN's return type and the SIMPLIFY argument.
此功能适用于FUN对元素中指定的X和Y。基本目的是作为一个取代outer组(元组)的,它也将接受任何矢量X和Y。返回值将是一个矩阵的维length(X)倍length(Y),原子或递归视FUN的返回类型和SIMPLIFY参数的复杂性而定。
参见----------See Also----------
set, tuple, outer.
set,tuple,outer。
实例----------Examples----------
set_outer(set(1,2), set(1,2,3), "/")
X <- set_outer(set(1,2), set(1,2,3), pair)
X[[1,1]]
Y <- set_outer(set(1,2), set(1,2,3), set)
Y[[1,1]]
set_outer(2 ^ set(1,2,3), set_is_subset)
tuple_outer(pair(1,2), triple(1,2,3))
tuple_outer(1:5, 1:4, "^")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|