Giving a different object name for the content of the returned list of purrr::map2()
问题 I'm trying to conduct a certain a calculation using purrr::map2() taking two different arguments. purrr::map2( .x = c(1, 3), .y = c(10, 20), function(.x, .y)rnorm(1, .x, .y) ) purrr::map2() returns a list, but I want to assign a distinct object name to each content within the list. For example, I want to name the first list [[1]] [1] -5.962716 as model1 and [[2]] [1] -29.58825 as model2 . In other words, I'd like to automate the object naming like model* <- purrr::map2[[*]] . Would anybody