Description Usage Arguments Details Value Author(s) See Also Examples
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).
1 | 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
1 2 3 4 5 6 7 8 9 10 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.