title: Error in match.fun(FUN) :
body: <p>Packages: 
  ggmap,
  ggplot2
  plyr </p>
  
  <p>I've used a mapdist function to calculate the distance between two postcodes. </p>
  
  <p>I wish to apply the mapdist function to a list and export to a csv. file.  </p>
  
  <p>Here is what iv tried.</p>
  
  <h1>Run mapdist and export</h1>
  
  <pre><code>data &lt;- mutate(dataset, from = NA, to = NA, m = NA, km = NA, miles = NA)
  
  lapply(dataset, mapdist(PostcodeA, PostcodeB, mode = "driving"))
  
  Error in match.fun(FUN) : 
  'mapdist(PostcodeA, PostcodeB, mode = "driving")' is not a function, character or symbol 
  
  dataset &lt;- data.frame(lapply(dataset, as.character))
  
  write.csv(dataset, "Rexport.csv")`
  </code></pre>
  
  <p>I have encountered an  Error in match.fun(FUN) :</p>
  
  <p>Any suggestions? </p>