It is almost always a mistake to call a function with duplicate arguments, i.e. arguments of the same name, like the following:
foo(bar1 = 1, bar1 = 2, bar3 = 3)
Therefore, in most cases, it might make sense to check all function calls and ensure there are no duplicate arguments.
One use case of duplicate argument is to produce some table that actually needs duplicate headers for demonstration in documents, e.g.
data <- data.frame(
mean = 1:5,
sd = 0.5,
mean = 2:6,
sd = 1,
check.names = FALSE
)
It is almost always a mistake to call a function with duplicate arguments, i.e. arguments of the same name, like the following:
Therefore, in most cases, it might make sense to check all function calls and ensure there are no duplicate arguments.
One use case of duplicate argument is to produce some table that actually needs duplicate headers for demonstration in documents, e.g.