Skip to contents

Works for agent-class.

Usage

speed(object)

speed(object) <- value

# S4 method for class 'agent'
speed(object)

# S4 method for class 'agent'
speed(object) <- value

Arguments

object

An instance of the agent-class.

value

Value with which to replace the original value of the speed slot.

See also

Examples

# Initialize agent
my_agent <- agent(center = c(0, 0), 
                  radius = 0.25, 
                  speed = 1)

# Access the speed slot for the agent
speed(my_agent)
#> ojehh 
#>     1 

# Change the speed slot for the agent
speed(my_agent) <- 2
speed(my_agent)
#> ojehh 
#>     2