# choose a file
fn <- ImportDlg()
print(gettextf("You chose the file: %s ", fn))
# the path and filename can as well be nested in a command,
# done here to build a read.table command that can be well inserted into the code:
ImportDlg(fmt="d.%fname% <- read.table(file = \"%path%\%fname%.%fxt%\",
header = TRUE, sep = \";\", na.strings = c(\"NA\",\"NULL\"), strip.white = TRUE)")
# go to your editor and paste...
Run the code above in your browser using DataCamp Workspace