title: How to access the first turtle of a code sequence in NetLogo 6.2?
body: <p>I have the following doubts:
  I have several individuals of 9 turtle codes.
  The turtle codes are: R1M1 R2M1 R3M1 R1M2 R2M2 R3M2 R1M3 R2M3 R3M3. And I have 10 individuals of each code.
  As the code is structured in a loop sequence and the order that the code exits in the result exported in .csv, I would like to ask the first individual of the first code (R1M1) to print the output header. But, I'm only getting it using one-of, and then the header often doesn't come out in the first line of the output. And I don't know how I can access the first turtle from the R1M1 code. Does anyone have any ideas?
  What I thought of is calling turtle 0 which has the code R1M1. But, I still don't know how to do this in NetLogo.
  OBS.: I tried to use only turtle 0, but in the other codes, too, there is turtle 0 and then the header appears.</p>
  <p>Thanks in advance</p>
  <pre><code>      let n count turtles with [ profiles-code = &quot;R1M1&quot; ]
        if n &gt; 0
        [
          ask one-of turtles with [ profiles-code = &quot;R1M1&quot; ]
          [
            prepare-header-output;; CALL A PROCEDURE
            
          ]
        ]
  </code></pre>
  <p>An example of how the header is coming out (has 3 individuals from each of the 9 codes)</p>
  <p><a href="https://i.stack.imgur.com/vjKnV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vjKnV.png" alt="enter image description here" /></a></p>