Learn R Programming

rgp (version 0.4-1)

seSymbolicFunction: Symbolic squared error function (SE)

Description

Given two functions f and g, returns a function whose body is the symbolic representation of the squared error between f and g, i.e. function(x) (f(x) - g(x))^2.

Usage

seSymbolicFunction(f, g)

Arguments

f
An R function.
g
An R function with the same formal arguments as f.

Value

A function representing the squared error between f and g.