【发布时间】:2021-12-11 02:45:48
【问题描述】:
我在rep() 中收到一条警告消息,指出each= 参数未矢量化。
是否有rep() 的矢量化替代方案tidyverse() 或其他基本 R 替代方案?
n_study <- 5
n_per_study_rows <- c(3,5,3,3,2)
rep(1:n_study, each=n_per_study_rows)
Warning message: first element used of 'each' argument
【问题讨论】:
-
预期输出是什么?
标签: r function loops vectorization mapply