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 https://r-charts.com/evolution/curve/
# Function
fun <- function(x) {
sin(sqrt(x ^ 2))
}
# Plot
curve(fun, from = -7, to = 7)
>Solution :
You must define your function with a single argument, x:
fun1 <- function( x){
1 / (1 + (x / 1)^.5)
}
curve(fun1, from=10, to=1000, n=101)
