Learn R Programming

readsdr (version 0.3.0)

sd_fixed_delay: Fixed delay

Description

Fixed delay

Usage

sd_fixed_delay(var, time, delay, init, .memory)

Value

A number.

Arguments

var

A string that indicates the delayed variable.

time

A number that indicates current simulation time.

delay

A number that indicates the delay time.

init

A number that indicates the function's output value of at the start of the simulation.

.memory

A data frame that keeps past values of delayed variables.

Examples

Run this code
.memory <- data.frame(time = 3, inflow = 3)
rownames(.memory) <- 3
sd_fixed_delay("inflow", 5, 2, 0, .memory)

Run the code above in your browser using DataLab