Interactive file choice in R
You can use the file.choose() command instead of the filename when reading a file. This works for Windows or Mac operating systems (in Linux you need to type the “filename” in full). Use file.choose() instead of the filename for reading data with read.csv() or for getting scripts with the source() command for example. You can also use it to write files as long as the file already exists, for example for saving the workspace via the save.image() command.
Comments are closed.