| sprout {NetLogoR} | R Documentation | 
Sprout new turtles
Description
Create n new turtles on specific patches.
Usage
sprout(n, patches, breed, heading, color, turtles)
## S4 method for signature 'numeric,matrix'
sprout(n, patches, breed, heading, color, turtles)
Arguments
| n | Integer. Vector of length 1 or of length the number of  | 
| patches | Matrix ( | 
| breed | Character. Vector of  | 
| heading | Numeric. Vector of values between 0 and 360.
Must be of length 1 or of length the number of  | 
| color | Character. Vector of  | 
| turtles | 
 | 
Details
nrow(patches) must be equal to 1 or to n.
     If `turtles` is provided, the new `turtles` are added to
     the `turtles` when returned. The `who` numbers of the sprouted `turtles`
     therefore follow the ones from the `turtles`.
     All new sprouted `turtles` are placed at the end of the `agentMatrix` object.
     If no `turtles`
     is provided, a new `agentMatrix` is created and the `who` numbers
     start at 0.
     If `turtles` is provided and had additional variables created
     with `turtlesOwn()`, `NA` is given for these variables
     for the new sprouted `turtles`.
Value
AgentMatrix including the new
sprouted turtles.
Author(s)
Sarah Bauduin
References
Wilensky, U. 1999. NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University. Evanston, IL.
See Also
https://ccl.northwestern.edu/netlogo/docs/dictionary.html#sprout
Examples
t1 <- sprout(patches = cbind(pxcor = 2, pycor = 2), n = 3)
t2 <- sprout(patches = cbind(pxcor = 3, pycor = 3), n = 3, turtles = t1)