美文网首页
20190428-R语言循环函数Reduce

20190428-R语言循环函数Reduce

作者: 天空的小白 | 来源:发表于2019-04-28 10:39 被阅读0次

-Usage
Reduce(f, x, init, right = FALSE, accumulate = FALSE)
对x的第一、二两个元素运行函数f,得到的结果与第三个元素再运行函数f,以此类推,最后将x的所有元素整合到一起;
-Arguments
x
x为向量(可以是原子向量,也可以是list),
init
an R object of the same kind as the elements of x.
right
a logical indicating whether to proceed from left to right (default) or from right to left.
accumulate
a logical indicating whether the successive reduce combinations should be
accumulated. By default, only the final combination is used.
-Example

Reduce
;

相关文章

网友评论

      本文标题:20190428-R语言循环函数Reduce

      本文链接:https://www.haomeiwen.com/subject/kcarnqtx.html