NLDfToList {RNetLogo} | R Documentation |
NLDfToList
pushes the values of a data.frame into NetLogo lists.
The column names of the data.frame are used as names for the NetLogo lists
(but the lists must already exist in the current NetLogo model).
NLDfToList(in.data.frame, nl.obj=NULL)
in.data.frame |
The data.frame to fill the NetLogo lists. |
nl.obj |
(optional) A string identifying a reference to a NetLogo instance created with |
Remember: There must be lists in the NetLogo model with the names of the columns of the submitted data.frame.
No return value.
Jan C. Thiele <rnetlogo@gmx.de>
NLDoCommand
,
NLDoCommandWhile
,
NLReport
## Not run:
NLStart("C:/Program Files/NetLogo 6.0/app")
df1 <- data.frame(x=c(1,2,3,4),y=c(5,6,7,8))
# the current NetLogo model must have two variables ('x' and 'y')
# add the variables
NLSourceFromString("globals [x y]", append.model=FALSE)
# set the variables to the data.frame
NLDfToList(df1)
## End(Not run)