title: How to update MySQL table using RMySQL package
body: <p>Instead of append or overwrite an entire table to database, is there any function in RMySQL that can update only part of the table? Because some of our data could be imcomplete someday, that I need to remain the old table and only replace the rows that has new data coming in, here is the function I wrote, but did not work, any help would be appreciated:</p>
  
  <pre><code>col.info &lt;- "(id int, timestamp bigint, yyyy int, mm int, dd int, value double, 
  PRIMARY KEY(id, timestamp, yyyy, mm, dd))"
  
  Func &lt;- function(con, tbl.name, dat.set, col.info) {
    if (dbExistsTable(con, tbl.name)) {  
    dbWriteTable(con, tbl.name, dat.set, row.names=F, append=T);  #what can I change the append for??
  
    } else { 
    dbSendQuery(con, paste("CREATE TABLE IF NOT EXISTS", tbl.name, col.info, sep=" ")); 
    dbWriteTable(con, tbl.name, dat.set, row.names=F, append=T);
    }
  } 
  
  Func(conn_table, "daily_update", df, col.info)
  </code></pre>