purrr::pmap with other default inputs
问题 I am wondering how to use pmap() function if I have more than 3 inputs as parameters to map into a function with other default inputs. Here is a reproducible example: a=c(5, 100, 900) b=c(1, 2, 3) ablist=list(mean=a,sd=b) pmap(ablist, ~rnorm( mean=a , sd=b , n = 9)) outputs: [[1]] [1] 5.734723 99.883171 895.962561 5.346905 98.723191 903.373177 4.172267 96.424440 897.437970 [[2]] [1] 4.427977 98.348139 899.287248 4.404674 99.178516 900.983974 3.836353 101.520355 899.992332 [[3]] [1] 4.961772