# Define an original function that expects arguments 'group' and 'score'
original_fun <- function(group, score, home = FALSE) {
list(group = group, score = score, home = home)
}
# Create a new function that maps 'x' to 'group' and 'y' to 'score'
new_fun <- par_convert_f(original_fun, x = group, y = score)
# Call the new function using the new argument names
result <- new_fun(x = 10, y = 20)
print(result)
Run the code above in your browser using DataLab