Learn R Programming

INLAvaan (version 0.2.3)

is_same_function: Helper function to check if two functions are the same

Description

Helper function to check if two functions are the same

Usage

is_same_function(f, g)

Value

Logical.

Arguments

f, g

Functions to compare.

Examples

Run this code
f1 <- function(x) { x^2 + 1 }
f2 <- function(x) { x^2 + 1 }
is_same_function(f1, f2)  # TRUE

Run the code above in your browser using DataLab