Skip to content

Instantly share code, notes, and snippets.

@rinze
Created August 31, 2013 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rinze/6397254 to your computer and use it in GitHub Desktop.
Save rinze/6397254 to your computer and use it in GitHub Desktop.
localpath <- "/home/chema/tmp/kaggle/digits/"
if (Sys.info()["sysname"] == "Windows")
localpath <- "C:/temp/kaggle/digits"
testFile <- file.path(localpath, "test.Rda")
trainFile <- file.path(localpath, "train.Rda")
if(!file.exists(testFile) && !file.exists(trainFile)) {
testCSV <- file.path(localpath, "test.csv")
trainCSV <- file.path(localpath, "train.csv")
testData <- read.csv(testCSV, header = TRUE)
trainData <- read.csv(trainCSV, header = TRUE)
save(testData, file = testFile)
save(trainData, file = trainFile)
}
if(!exists("testData"))
load(testFile)
if(!exists("trainData"))
load(trainFile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment