title: R: How does the summary(factor) function order the values?
body: <p>I have a larga database, and I wanted to print out the number of elements in each factor, with this code:</p>
  
  <pre><code>summary(factor(Bond$Cf$ISIN, levels = Bond$ISIN), maxsum = 1000)
  </code></pre>
  
  <p>I got this output below. My question is: how does this order the values? At first glance I thought it orders it according to the number of values in each factor but then I saw <code>NL0009054907</code>. It has 7 elements, but somehow It appears among the factors with 4 elements. </p>
  
  <pre><code>DE000A1X3LN0 XS1002977103 XS1014670233 DE000CZ40JH0 XS1016720853 XS0973623514 DE000HSH4QN3 XS0997333223 DE000A13SWD8 DE000HSH4XP4 
         3            3            3            3            3            3             3            3            3            3 
  XS1033018158 XS1369254310 XS1041793123 XS1196748757 XS1043150462DE000CZ40K31 XS0187339600 XS0413584672 XS1046237431 DE000CB83CE3 
         3            3            3            3            3            3            3            3            3            4 
  XS1050665386 XS1385935769 FR0010743070 FR0011233337 XS0418053152 XS0914402887 NL0009054907 XS0984200617 XS0993272862 XS0423989267 
         4            4            4            4            4            4            7            4            4            4 
  XS0296306078 DE000CZ40KW7 XS1070100257 XS0996755350 ES03136793B0 XS0432092137 XS0429192767 DE000HV2AKV6 XS1077629225 XS1078760813 
         4            4            4            4            4            4            4            4            4            4 
  DE000HSH28Z5 DE000HSH2893 XS1080952960 DE000DB7UQ89 XS1084838496 XS1236611684 DE000HSH41B9 DE000CZ291M8 DE000HSH3AM1 DE000HSH28J9 
         4            4            4            4            4            4            4            4            4            4 
  </code></pre>