Skip to content
Prev 360393 / 398503 Next

Using read.csv() to import data

On 24/04/2016 4:30 PM, Jason Hernandez via R-help wrote:
By far the easiest ways to enter Windows file paths are using the 
file.choose() and choose.files() functions.  Do something like

filename <- file.choose() # navigate to the file
mammals <- read.csv(filename)

and you should be fine.  The file.choose() function works on all 
platforms; choose.files() works only on Windows (and has more options, 
including allowing multiple files to be chosen).

Duncan Murdoch