Created
April 1, 2020 03:37
-
-
Save YiLi225/faf230d22e878b81396030569aa58b76 to your computer and use it in GitHub Desktop.
Read in the series datasets
This file contains 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
######## 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 | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how to run please send code