This function takes a list of function arguments and additional arguments passed with the dot (...). It overwrites the function arguments with the values from the dot arguments if they have the same names.

overwrite_dot_arguments(function_args, ...)

Arguments

function_args

A named list of function arguments.

...

Additional arguments passed with the dot (...). These arguments will overwrite the corresponding ones in function_args if they have the same names.

Value

A list containing the original function_args with any overwritten values from the dot arguments.

Examples

# Example usage
original_args <- list(a = 1, b = 2)
result <- overwrite_dot_arguments(original_args, b = 3, c = 4)
result
#> $a
#> [1] 1
#> 
#> $b
#> [1] 3
#> 
#> $c
#> [1] 4
#>