Heaviside: Heaviside

View source: R/utils.R

HeavisideR Documentation

Heaviside

Description

Evaluate the Heaviside function with threshold indicating the discontinuity. If elements in x are greater than or equal to threshold, returns 1. Otherwise, returns 0.

Usage

Heaviside(x, threshold = 0)

Arguments

x

(Numeric) A numeric vector.

threshold

(Numeric) A threshold value used to compare to elements in x. (Defaults to 0.)

Value

A vector of 1 and 0. 1 indicates the element in x is larger or equal to the threshold.


invitroTKstats documentation built on Aug. 23, 2025, 9:08 a.m.