purrr中有多个迭代函数,可以用于快速解决循环迭代的问题,purrr中常用的迭代函数有map、map2、walk、reduce等等。...注意:此时的跳过是指的不对跳过的列执行函数mean,直接将其内容返回。...map2(name, value, ~stringr::str_c(.x, .y[[1]], collapse=""))
#[[1]]
#[1] "mean1"
#
#[[2]]
#[1] "sd4"
pmap...pmap(.l, .f, ...)
pmap代表对多个列表进行迭代,将多个列表包装为一个列表传给.f可。...x <- 1:3
y <- list(4,5,6)
z <- list(1,2,3)
pmap(list(mean=x, sd=y, n=z), rnorm)
#相当于rnorm(mean=1, sd=