title: R rename dataset
body: <p>I'm creating a GUI using Tcltk package and I would like to know if there is a way to rename the dataset I'm importing. Basically, I would like the user to choose a name for the dataset he imports, but my code below is not giving me that. What Im trying to do is the same concept as RStudio does when importing a file.
  Can someone point me to the right direction?</p>
  
  <p>Thank you in advance!</p>
  
  <pre><code>require(tcltk)
  tt &lt;- tktoplevel()
  tkwm.title(tt, "Read Text Data")
  dsName &lt;- tclVar("Dataset")
  entry.Name &lt;-tkentry(tt,width="20",textvariable=dsName)
  entry.box &lt;- tklabel(tt,text="Please enter dataset name:")
  tkgrid(entry.box, entry.Name)
  tkgrid(tklabel(tt,text=""))
  
  onOk &lt;- function() 
  {
    myval &lt;- tclvalue(tkgetOpenFile())
    myData &lt;&lt;- read.table(myval, header=TRUE, sep=",", dec = ".")
  } 
  
  OK.but &lt;- tkbutton(tt,text="  Import  ",command=onOk)
  Qt.but &lt;- tkbutton(tt,text="  Cancel  ",command=function()tkdestroy(tt))
  tkgrid(OK.but, Qt.but)
  tkfocus(tt)
  </code></pre>