Reputation: 173
I need to call the output from function1 in function2 for estimating purposes.
x=function(param)
{
z=param^2
}
y=function(param1)
{
q=z
zz=q*3
}
How to define z in fonction x to be able to call z later in function y?
Upvotes: 0
Views: 49
Reputation: 61
You just need to call function x in y :
x <- function(param1){param1^2}
y <- function(param2){x(param2)*3}
Upvotes: 2