R软件中的rep什么意思

Python011

R软件中的rep什么意思,第1张

R语言吗?rep replicates the values in x. It is a generic function, and the (internal) default method is described here.

repx复制的值。它是一个通用的功能,这里所描述的(内部)的默认方法。

rep.int is a faster simplified version for the most common case.

rep.int是最常见的情况更快的简化版本。

a1 <- seq(0, 3, by = 1)

a2 <- rep(a1, each = 4)

b1 <- seq(1, 4, by = 1)

b2 <- rep(b1, 4)

x <- a2 + b2

x就是你要的。

觉得对请采纳我的答案。