title: How to use R apply without changing a function
body: <p>I have a basic character date to <code>POSIXct</code> function</p>
  
  <pre><code>charDateToPosixct &lt;- function(chrDate, format, timeZone) {
      as.POSIXct(chrDate, format=format, tz=timeZone)
  }
  </code></pre>
  
  <p>I have a data frame with date as character and timezone.  </p>
  
  <pre><code>chrDate &lt;- c("4/25/2012","4/24/2012","4/16/2012","6/30/2012")
  timeZone &lt;- c("US/Eastern","US/Central","US/Pacific","US/Eastern")
  df &lt;- data.frame(date=chrDate,timezone=timeZone)
  str(df)
  'data.frame':   4 obs. of  2 variables:
   $ date    : Factor w/ 4 levels "4/16/2012","4/24/2012",..: 3 2 1 4
   $ timezone: Factor w/ 3 levels "US/Central","US/Eastern",..: 2 1 3 2
  </code></pre>
  
  <p>I want to change the data type of date to <code>POSIXct</code> and so want to apply this function <code>charDateToPosixct</code> to each row with the format <code>"%m/%d/%y"</code>.</p>