Closed SarahBauduin closed 8 years ago
Hmm. This may be the same problem I have been having with agentMatrix class. It may mean it needs to be an S4 class object.
On Thu, Apr 28, 2016 at 11:54 AM, Sarah Bauduin notifications@github.com wrote:
If world is a NLworldMatrix object, world[0,0] does not use the method [] defined for NLworldMatrix object, it uses the method for the matrix and therefore world[0,0] does not work.
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/PredictiveEcology/NetLogoR/issues/11
Because there are the functions of() and set() to access and change values of the world, I don't think we need [] and []<- to work on NLworldMatrix
Solved by changing the NLworldMatrix and NLworldArray objects into S4 objects
If
world
is a NLworldMatrix object,world[0,0]
does not use the method[]
defined for NLworldMatrix object, it uses the method for the matrix and thereforeworld[0,0]
does not work.