Convert 12 hour character time to 24 hour <p>I have a data set with the time in character format. I’m attempting to covert this from a 12 hour format to 24. I have done some searching, but everything I have found seems to assume the characters are already in 24 hour format. Here is an example of the times I'm working with.</p> <pre><code>times &lt;- c("9:06 AM", "4:42 PM", "3:05 PM", "12:00 PM", "3:38 AM") </code></pre>