I have a list of n files with identical columns and I want to subset them based on some conditions which are "captured" in a vector a of the same lenght as the file number, n.
list_files(file_1, file_2, ..., file_n)
a <- c(1, 2, 3, ....,n).
I need to extract from each file those rows which meet a condition related to the same column in each file (Column_1) and bind them together with
rez[1] <- list_file[[1]] %>%
filter(Column_1 == a[1])
rez[2] <- list_file[[2]] %>%
filter(Column_1 == a[2]),
.
.
.
I tried a for loop but I got stucked at the results binding (rbind(rez[1], rez[2], ) Any help? Thank you