An inline call to integrate that returns the value of
the integral directly, rather than the usual list.
Author
Ben Wiseman, benjamin.h.wiseman@gmail.com
Examples
f <- function(x) x^2
f %integrate% c(0, 1) # 0.3333333
#> [1] 0.3333333
# compared with base R, which returns a list:
str(integrate(f, 0, 1))
#> List of 5
#> $ value : num 0.333
#> $ abs.error : num 3.7e-15
#> $ subdivisions: int 1
#> $ message : chr "OK"
#> $ call : language integrate(f = f, lower = 0, upper = 1)
#> - attr(*, "class")= chr "integrate"