# NOT RUN {
## Lets create a really hard data set, an exxample of a "2:2 function" taken from [3]
## This function for x>0 has an inflectrion point at
## x = -1/8+(1/24)*sqrt(381) = 0.6883008876 ~0.69
## We want to see ,if function 'check_curve()' will proper classify it,
## given that we used [0.2,4] as definition range.
f=function(x){(1/8*x+1/2*x^2)/(1+1/8*x+1/2*x^2)}
x=seq(0.2,4,0.05)
y=f(x)
plot(x,y,pch=19,cex=0.5)
cc=check_curve(x,y)
cc
## $ctype
## [1] "convex_concave"
##
## $index
## [1] 0
##
## Yes it found it.
# }
Run the code above in your browser using DataLab