pmap output names help file
ggrothendieck opened this issue · 1 comments
ggrothendieck commented
The help file for pmap
says
The output names are determined by the input names.
but the names of BOD are c("Time", "demand")
and the output has no names. There were some SO posts guessing that it means the names of the first column of the input (https://stackoverflow.com/questions/78310377/name-output-of-pmap-on-tibble/78310769#78310769) or the first column with names in the input (https://stackoverflow.com/questions/78314849/naming-of-elements-in-purrrmap). Please clarify.
str(pmap(BOD, ~ .x + .y))
## List of 6
## $ : num 9.3
## $ : num 12.3
## $ : num 22
## $ : num 20
## $ : num 20.6
## $ : num 26.8
hadley commented
Looking at the source code, yes, the names come from names of the first element.