Skip to contents

Works for goal-class.

Usage

counter(object)

counter(object) <- value

# S4 method for class 'goal'
counter(object)

# S4 method for class 'goal'
counter(object) <- value

Arguments

object

An instance of the goal-class.

value

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

Examples

# Initialize a goal with a given counter
my_goal <- goal(position = c(0, 0), 
                counter = 5)

# Access the counter 
counter(my_goal)
#> [1] 5

# Change the counter
counter(my_goal) <- 10
counter(my_goal)
#> [1] 10