Learn R Programming

Deriv (version 4.3.5)

Deriv_cpp: Symbolic Differentiation (Supports Vectors of Variables)

Description

Computes the symbolic derivative of an R expression with respect to one or more target variables. If a single target is provided, it returns a scalar expression. If multiple targets are provided, it returns a named c() call.

Usage

Deriv_cpp(expr, x, env = parent.frame(), drule = Deriv::drule)

Value

A simplified R expression (or a named c() call for multiple inputs).

Arguments

expr

An R language object, symbol, or numeric constant to differentiate.

x

A character vector, symbol, or named vector of targets.

env

An environment to resolve function calls in (defaults to parent.frame()).

drule

An environment containing derivative rules (cf. Details in Deriv for syntax rules).

Details

This version is much faster for simple expressions but has less features than its R counterpart Deriv().

See Also

Deriv