lim: Limit of a function

View source: R/calculus.R

limR Documentation

Limit of a function

Description

Limit of a function

Usage

lim(f, var, val, dir = NULL, doit = TRUE)

Arguments

f

Function to take limit of

var

Variable to take limit for (either string or caracas_symbol)

val

Value for var to approach

dir

Direction from where var should approach val: '+' or '-'

doit

Evaluate the limit immediately (or later with doit())

Examples

if (has_sympy()) {
  x <- symbol("x")
  lim(sin(x)/x, "x", 0)
  lim(1/x, "x", 0, dir = '+')
  lim(1/x, "x", 0, dir = '-')
}


caracas documentation built on June 22, 2024, 10:59 a.m.