title: Calculate the complexity of a function in R
body: <p>I need to calculate the complexity of a long function (600 lignes) with R.
  My wanted result may look like this </p>
  
  <pre><code>start calculate complexity
  **My function**
  End calculate complexity
  result= " the complexity of this function is x
  </code></pre>
  
  <p>I think that I miss understand but  What i found in benchmarking calculates just the runing time</p>
  
  <pre><code>start.time &lt;- Sys.time()
  *****function*****
  end.time &lt;- Sys.time()
  time.taken &lt;- end.time - start.time
  time.taken
  </code></pre>
  
  <p>and this function works just on vectors </p>
  
  <pre><code>    complexity(x, scaleMin, scaleMax, width = 7, measure = "complexity", 
     rescale = FALSE)
  </code></pre>
  
  <p>Is there another alternativ or I can update those functions to my need</p>