pmax.sa(sfsmisc)
pmax.sa()所属R语言包:sfsmisc
Parallel Maxima / Minima (Scalar, Array)
并行最大值/最小值(标量,数组)
译者:生物统计家园网 机器人LoveR
描述----------Description----------
These are versions of pmax and pmin which return (more-dimensional) arrays.
这是pmax和pmin返回(维)阵列的版本。
用法----------Usage----------
pmax.sa(scalar, arr)
pmin.sa(scalar, arr)
参数----------Arguments----------
参数:scalar
numeric scalar.
数字标量。
参数:arr
any numeric R object, typically array.
任何数字的R对象,典型的阵列。
值----------Value----------
an array with the same dim and dimnames as the input arr.
数组相同dim和dimnames输入arr。
(作者)----------Author(s)----------
Martin Maechler
参见----------See Also----------
pmin.
pmin。
实例----------Examples----------
m <- cbind(a=1:5, b=3:7, c=-2:2)
pmax (3, m) # < dropping all attributes[删除所有属性]
pmax.sa(3, m) # matrix with dimnames[矩阵dimnames]
## no "added value" for simple case:[#没有“增值”为简单的例子:]
x <- rpois(20, 7)
stopifnot(identical(pmin (2.1, x),
pmin.sa(2.1, x)),
identical(pmax (2.1, 3),
pmax.sa(2.1, 3)))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|