file.choose: empowering useRs | Swimming the Data Lake

# file.choose: empowering useRs

## 2017/17/07

Sometimes when sharing your analysis, via Rmarkdown or the brand new NoteBook, the data file is located at the user’s computer, making unusable the default path from your own pc. But it’s easy to allow users to choose the data file to be imported and perform code execution using this file. it’s an easy command:

myFile <- file.choose()

a dialog will be opened for the user to browse file system and choose the file. If you need to load a folder to process all the files within, don’t worry:

myFolder <- choose.dir()

As you can imagine, sometimes it’s a tough decision to leave to user’s consideration the proper files. That’s the hard part.

The code, it’s the easy part.