title: sparklyr: create new column with mutate function
body: <p>I'm very surprised if this kind of problems cannot be solved with sparklyr:</p>
  
  <pre><code>iris_tbl &lt;- copy_to(sc, aDataFrame)
  
  # date_vector is a character vector of element
  # in this format: YYYY-MM-DD (year, month, day)
  for (d in date_vector) {
     ...
     aDataFrame %&gt;% mutate(newValue=gsub("-","",d)))
     ...
  }
  </code></pre>
  
  <p>I receive this error:</p>
  
  <pre><code>Error: org.apache.spark.sql.AnalysisException: Undefined function: 'GSUB'. This function is neither a registered temporary function nor a permanent function registered in the database 'default'.; line 2 pos 86
      at org.apache.spark.sql.catalyst.catalog.SessionCatalog.failFunctionLookup(SessionCatalog.scala:787)
      at org.apache.spark.sql.hive.HiveSessionCatalog.lookupFunction0(HiveSessionCatalog.scala:200)
      at org.apache.spark.sql.hive.HiveSessionCatalog.lookupFunction(HiveSessionCatalog.scala:172)
      at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveFunctions$$anonfun$apply$13$$anonfun$applyOrElse$6$$anonfun$applyOrElse$39.apply(Analyzer.scala:884)
      at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveFunctions$$anonfun$apply$13$$anonfun$applyOrElse$6$$anonfun$applyOrElse$39.apply(Analyzer.scala:884)
      at org.apache.spark.sql.catalyst.analysis.package$.withPosition(package.scala:48)
      at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveFunctions$$anonfun$apply$13$$anonfun
  </code></pre>
  
  <p>But with this line:</p>
  
  <pre><code>aDataFrame %&gt;% mutate(newValue=toupper("hello"))
  </code></pre>
  
  <p>things work. Some help?</p>