title: how to pass variables from r program to mysql function
body: <p>I am new to R Programming and MySQL.  I have a requirement where I need to read the variables from R Programming and need to pass those as inputs to a function in MySQL. 
  Can someone please help me in this regard?</p>
  
  <pre><code>options(echo=FALSE)
  args &lt;- commandArgs(trailingOnly=TRUE)
  start.date &lt;- as.Date(args[1])
  end.date &lt;- as.Date(args[2])
  library(RMySQL)
  mydb = dbConnect(mydb,xxxx)
  rs &lt;- dbSendQuery(mydb,"SELECT COMPUTE_WEEKS(start.date,end.date) FROM DUAL;")
  </code></pre>
  
  <p>Below is the error I am getting.</p>
  
  <p>rs &lt;- dbSendQuery(mydb, "SELECT COMPUTE_WEEKS(start.date,end.date) FROM DUAL;")
  Error in .local(conn, statement, ...) : 
    could not run statement: Unknown table 'start' in field list</p>
  
  <p>Need to understand how to read data from r-program and pass it as arguments to procedures/functions in My-SQL.  Currently using RMysql library.</p>
  
  <p>Regards
  Bhanu Pratap M </p>