Closed ggrothendieck closed 2 days ago
The help file for pmap says
pmap
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.
c("Time", "demand")
str(pmap(BOD, ~ .x + .y)) ## List of 6 ## $ : num 9.3 ## $ : num 12.3 ## $ : num 22 ## $ : num 20 ## $ : num 20.6 ## $ : num 26.8
Looking at the source code, yes, the names come from names of the first element.
The help file for
pmap
saysbut 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.