add_linear_terms: add_linear_terms: Add linear terms to another function....

View source: R/add_linear_terms.R

add_linear_termsR Documentation

add_linear_terms: Add linear terms to another function. Allows you to easily change an existing function to include linear terms.

Description

add_linear_terms: Add linear terms to another function. Allows you to easily change an existing function to include linear terms.

Usage

add_linear_terms(func, coeffs)

Arguments

func

Function to add linear terms to

coeffs

Linear coefficients, should have same length as function has dimensions

Value

Function with added linear terms

Examples

banana(c(.1,.2))
add_linear_terms(banana, coeffs=c(10,1000))(c(.1,.2))

TestFunctions documentation built on Sept. 30, 2024, 9:31 a.m.