I'm trying to create a custom function that has an arugment that requires the arguments of another function. For instance, something like this:
funct1 <- function(x,y,z){
x + y + z
}
funct2 <- function(funct1, multiplier) {
print("first arg is ": [funct1 x arg]
print("second arg is ": [funct1 y arg]
print("third arg is ": [funct1 z arg]
}
first <- funct1(1,2,3)
funct2(first1, 2)
#first arg is 1
#second arg is 2
#third arg is 3
first <- funct1(3,4,5) #12
funct2(first1, 2)
#first arg is 3
#second arg is 4
#third arg is 5
funct1()or not? That fundamentally changes the answer.funct1as I plan on assigning it to different objects. What I'm trying to do is makefunct2dynamically depending on what is passed withfunct1. Hope this helps!funct1takes three inputs and returns 1, yet you think that you're going to use them from that function. You're not.