Limit of a function
lim(f, var, val, dir = NULL, doit = TRUE)
Function to take limit of
Variable to take limit for (either string or caracas_symbol
)
Value for var
to approach
Direction from where var
should approach val
: '+'
or '-'
Evaluate the limit immediately (or later with doit()
)
if (has_sympy()) {
x <- symbol("x")
lim(sin(x)/x, "x", 0)
lim(1/x, "x", 0, dir = '+')
lim(1/x, "x", 0, dir = '-')
}
Run the code above in your browser using DataLab