title: How to convert time difference into minutes in R?
body: <p>I have the following program:</p>
  
  <pre><code>timeStart&lt;-Sys.time()
  timeEnd&lt;-Sys.time()
  difference&lt;-timeEnd-timeStart
  anyVector&lt;-c(difference)
  </code></pre>
  
  <p>at the end I need to put that data into a vector, the problem that I have is than when the difference is in seconds the value is like:</p>
  
  <pre><code>4.46809 seconds
  </code></pre>
  
  <p>and when it passes some minutes the values is like:</p>
  
  <pre><code>2.344445 minutes
  </code></pre>
  
  <p>I would like that the answer is converted to minutes in any case, but when I do something like this:</p>
  
  <pre><code>anyVector&lt;-c(difference/60)
  </code></pre>
  
  <p>for the case that the value of the difference is in seconds work fine, but it will also transform the data when is in minutes giving me an incorrect number.</p>
  
  <p>So, how I can convert to minutes only when the answer is in seconds and not where is in minutes already?</p>