title: How to save a data frame as CSV to a user selected location using tcltk
body: <p>I have a data frame called, <code>Fail</code>.  </p>
  
  <p>I would like to save <code>Fail</code> as a CSV in a location that the user selects.  Below is some example code that I found, but I don't know how to incorporate <code>Fail</code> into it.</p>
  
  <pre><code>require(tcltk)
  fileName &lt;- tclvalue(tkgetSaveFile())
  if (!nchar(fileName)) {
      tkmessageBox(message = "No file was selected!")
  } else {
      tkmessageBox(message = paste("The file selected was", fileName))
  }
  </code></pre>