ltorgo / DMwR2

Functions and data supporting the 2nd edition of the book Data Mining with R by Luis Torgo, published by CRC Press
27 stars 19 forks source link

Error with sampleCSV because of space in directory name #3

Open WarrenC opened 6 years ago

WarrenC commented 6 years ago

I downloaded “flights14.csv” from the following site. https://github.com/arunsrinivasan/flights/wiki/NYC-Flights-2014-data

I am working on macOS High Sierra Version 10.13.3. I am using R version 3.5.0 (2018-04-23) -- "Joy in Playing” with DMwR2_0.0.2. I created “test 1” as a subdirectory in “Users” as an example. /Users/test 1

The following line does not execute with the “space” between “test” and “1” in the subdirectory name: flights1000_1 <- sampleCSV(file = "/Users/test 1/flights14.csv", percORn = 1000, header = T)

The following message is displayed in the console. wc: /Users/test: open: No such file or directory wc: 1/flights14.csv: open: No such file or directory sh: /Users/test: Permission denied Error: '/Users/test 1/flights14.csv.tmp.csv' does not exist. In addition: Warning message: In system(paste("wc -l", f), intern = TRUE) : running command 'wc -l /Users/test 1/flights14.csv' had status 1