library(mosaicCalc)
## Loading required package: mosaic
## Registered S3 method overwritten by 'mosaic':
## method from
## fortify.SpatialPolygonsDataFrame ggplot2
##
## The 'mosaic' package masks several functions from core packages in order to add
## additional features. The original behavior of these functions should not be affected by this.
##
## Attaching package: 'mosaic'
## The following objects are masked from 'package:dplyr':
##
## count, do, tally
## The following object is masked from 'package:Matrix':
##
## mean
## The following object is masked from 'package:ggplot2':
##
## stat
## The following objects are masked from 'package:stats':
##
## binom.test, cor, cor.test, cov, fivenum, IQR, median, prop.test,
## quantile, sd, t.test, var
## The following objects are masked from 'package:base':
##
## max, mean, min, prod, range, sample, sum
## Loading required package: mosaicCore
##
## Attaching package: 'mosaicCore'
## The following objects are masked from 'package:dplyr':
##
## count, tally
##
## Attaching package: 'mosaicCalc'
## The following object is masked from 'package:stats':
##
## D
func=makeFun(x^3 - 5*x ~ x)
AROC=makeFun( (func(b) - func(a))/(b-a) ~ a & b)
AROC(a=2,b=2.1)
## [1] 7.61
func=makeFun(x^3 - 5*x ~ x)
AROC=makeFun( (func(b) * func(a))/(b-a) ~ a & b)
AROC(a=2,b=2.01)
## [1] 385.8798
func=makeFun(x^3 - 5*x ~ x)
AROC=makeFun( (func(b) ^ func(a))/(b-a) ~ a & b)
AROC(a=2,b=2.001)
## [1] 251.7607
func=makeFun(x^3 - 5*x ~ x)
AROC=makeFun( (func(a) - func(b))/(b-a) ~ a & b)
AROC(a=1.99999,b=2)
## [1] -6.99994
func=makeFun(x^5 - 26*x ~ x)
AROC=makeFun( (func(a) - func(b))/(a-b) ~ a & b)
AROC(a=4,b=3.01)
## [1] 758.7706
func=makeFun(x^5 - 26*x ~ x)
AROC=makeFun( (func(a) - func(b))/(a-b) ~ a & b)
AROC(a=100,b=4.5)
## [1] 104711997
func=makeFun(x^6 - 55*x ~ x)
AROC=makeFun( (func(a) - func(b))/(a-b) ~ a & b)
AROC(a=2,b=5.01)
## [1] 5177.372
func=makeFun(x^3 - 37*x ~ x)
AROC=makeFun( (func(a) - func(b))/(a-b) ~ a & b)
AROC(a=4,b=3.0)
## [1] 0
func=makeFun(x^2 - 46*x ~ x)
AROC=makeFun( (func(a) - func(b))/(a-b) ~ a & b)
AROC(a=8,b=61)
## [1] 23
func=makeFun(x^5 - 6*x ~ x)
AROC=makeFun( (func(b) - func(a))/(a-b) ~ a & b)
AROC(a=8,b=91)
## [1] -75184195