Skip to contents

Fits a function that returns 0 for any given input value

Usage

fit_null(output = 0)

Arguments

output

which value to return (default is 0)

x

vector of any class

Value

function that accepts x and returns the value of output

Details

A function to pass on to the Endosymbiont model which can be used to nullify any process. The default output is 0, and therefore can be used to stand-in for any process that is modelled as a function accepting an input vector. However, the output can be changed to a different value (e.g., 1) if required, as long as the null process is supposed to return a constant value.

See also

Examples

my_func <- EndoSim:::fit_null(0)
plot(seq(0, 50, by = 0.1), my_func(seq(0, 50, by = 0.1)), type = "l")


my_func <- EndoSim:::fit_null(1)
plot(seq(0, 50, by = 0.1), my_func(seq(0, 50, by = 0.1)), type = "l")


my_func <- EndoSim:::fit_null(0.5)
plot(seq(0, 50, by = 0.1), my_func(seq(0, 50, by = 0.1)), type = "l")