Description Usage Arguments Methods (by generic) Slots See Also Examples
An S4 class to represent an agent.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## S4 method for signature 'Agent'
getLocation(object)
## S4 method for signature 'Agent'
getVelocity(object)
## S4 method for signature 'Agent'
getActive(object)
## S4 method for signature 'Agent'
setLocation(object, location)
## S4 method for signature 'Agent'
setVelocity(object, velocity)
## S4 method for signature 'Agent'
setActive(object, active)
|
object |
An object of class "Agent" |
location |
A numerical vector of length 2 specifying the x- and y-position of the object [Default: c(0, 0)]. |
velocity |
A numerical vector of length 2 specifying the velocity in the x- and y-direction of the object [Default: c(0, 0)]. |
active |
A length-one logical vector indicating whether the object is active (TRUE) or not (FALSE) [Default: TRUE]. |
getLocation
: Retreive the location slot of an object of class "Agent".
getVelocity
: Retreive the velocity slot of an object of class "Agent".
getActive
: Retreive the active slot of an object of class "Agent".
setLocation
: Assign the location slot of an object of class "Agent".
setVelocity
: Assign the velocity slot of an object of class "Agent".
setActive
: Assign the active slot of an object of class "Agent".
location
A numerical vector of length 2 specifying the x- and y-position of the object [Default: c(0, 0)].
velocity
A numeric vector for specifying the object's velocity, where the first value specifies the velocity in the x-direction and the second in the y-direction [Default: c(0.0, 0.0)].
active
A length-one logical vector indicating whether the object is active [Default: TRUE].
validAgentObject
, initialize,Agent-method
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.