Skip to content

Instantly share code, notes, and snippets.

@YiLi225
Created April 1, 2020 03:37
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 YiLi225/faf230d22e878b81396030569aa58b76 to your computer and use it in GitHub Desktop.
Save YiLi225/faf230d22e878b81396030569aa58b76 to your computer and use it in GitHub Desktop.
Read in the series datasets
######## Point to your data directory
series_all_files = list.files(series_data_dir)
series_data_files = series_all_files[grepl('.csv', series_all_files)]
print(sprintf('Total data files = %s', length(series_data_files)))
series_data_ = lapply(series_data_files,
function(i) {
dat = read.csv(paste0(series_data_dir, '/', i), stringsAsFactors = FALSE)
file_ = gsub('.csv', '', i)
dat$Status = strsplit(file_, '_')[[1]][4]
dat
})
@kshemdikshit
Copy link

how to run please send code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment