I want to create a function that takes a character vector as an argument and do something with R objects that have elements of this character vector as their names. For example, let's say I have three numeric R objects defined in the global environment: x, y, and z. I want to create a unary function that takes c("x", "y", "z") as an argument and returns the result of (x + y) * z.
How can I do this?