Learn R Programming

roperators (version 1.3.14)

integrate: Inline integration

Description

inline call to integrate that returns integration value rather than list

Usage

f %integrate% range

Arguments

f

function (with numeric return)

range

vector of two numbers c(low, high)

Examples

Run this code
f <- function(x) x^2
print(f %integrate% c(0, 1))
# vs base
x <- integrate(f, 0, 1)
str(x)

Run the code above in your browser using DataLab