Skip to contents

Works for agent-class.

Usage

group(object)

group(object) <- value

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

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

Arguments

object

An instance of the agent-class.

value

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

See also

Examples

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

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

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