title: Load in data for turtles in Netlogo: loop seems to stop
body: <p>I'm trying to load data from R to Netlogo. I always get the error</p>
  <blockquote>
  <p>Cannot move turtle beyond the worlds edge. <br/>
  error while turtle 8 running SET <br/>
  called by procedure LOAD-DATA <br/>
  called by procedure SETUP <br/>
  called by Button 'Setup' <br/></p>
  </blockquote>
  <p>I defined the world edge</p>
  <pre><code>
        let minworldx r:get &quot;min(dataTurtle$bcx)&quot;
        let maxworldx r:get &quot;max(dataTurtle$bcx)&quot;
        letminworldy r:get &quot;min(dataTurtle$bcy)&quot;
        let maxworldy r:get &quot;max(dataTurtle$bcy)&quot;
        resize-world minworldx maxworldx minworldy maxworldy
  
  </code></pre>
  <p>The turtles are defined as follows</p>
  <pre><code>
      set dataTurt r:get &quot;dataTurtle&quot; ; transfers data to Netlogo
       print dataTurt  ; just to test
        ask turtles  ; reads in data to the variables
        [ set color 14
          set heading 1
          set xcor item who Item 1 dataTurt
          set ycor item who Item 2 dataTurt
          set label item who Item 0 dataTurt
          set P_FertSpace 2000  ; just a value test value
          
          ]
  
  </code></pre>
  <p>How can I ensure that all turtles that I create get the assinged data?</p>