I have my funcion :
fun1 <- function( x, y, z ){
1 / (1 (x / y)^z)
}
I want to crate curve
for my function
On X axxis I want values I will give for x, e.g. 10 50, 1000 in my function for Y axis I want fun1 results given different x. For y in function I wants the value 1 and for z I want 0.5 always regardless of the given x.
I try to emulate this code from the site
CodePudding user response:
If fun1
is defined as in the question then we can use the following. It was unclear what domain you want to use. There we three numbers mentioned in the question 10, 50, 1000 so we used the interval from 10 to 50 as the domain of x but you can easily change that if you want a different domain.
curve(fun1(x, y = 1, z = 0.5), from = 10, to = 50)