Created
August 19, 2018 11:40
-
-
Save mrchypark/5d3d83d11361c473bae9fb734f933038 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source("https://install-github.me/tidyverse/googledrive") | |
# source("https://install-github.me/tidyverse/tidyverse") | |
# source("https://install-github.me/Rdatatable/data.table") | |
# source("https://install-github.me/hadley/dtplyr") | |
pack <- c("googledrive","dplyr","tidyr","purrr","data.table","dtplyr") | |
invisible(lapply(pack, library, character.only = TRUE)) | |
dir.create("./data") | |
drive_auth() | |
ids <- drive_ls(as_id("1-GTQhq5HyxE5ePfjV0OwDIFiouHe2l5l")) | |
for(i in 1: nrow(ids)){ | |
drive_download(as_id(ids$id[i]), paste0("./data/",ids$name[i])) | |
} | |
unz <- list.files("./data", pattern = "zip") | |
for(i in 1:length(unz)){ | |
unzip(zipfile = paste0("./data/",unz[i]), exdir = "./data") | |
} | |
file.remove(paste0("./data/",unz)) | |
tra <- fread("./data/train.csv") | |
stes <- fread("./data/test.csv") | |
sub <- fread("./data/submission.csv") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment