I need to import 8 txt files into R. Is there a way to grab them all together?
The file names are similar to each other, is there a way to avoid repetitiveness?
pbp_2020_total <- read.delim("2020_pbp_b10_amb_trans.txt")
pbp_2020_vbid <- read.delim("2020_pbp_b10_b19b_amb_trans_vbid_uf.txt")
pbp_2021_total <- read.delim("2021_pbp_b10_amb_trans.txt")
pbp_2021_vbid <- read.delim("2021_pbp_b10_b19b_amb_trans_vbid_uf.txt")
pbp_2022_total <- read.delim("2022_pbp_b10_amb_trans.txt")
pbp_2022_vbid <- read.delim("2022_pbp_b10_b19b_amb_trans_vbid_uf.txt")
pbp_2023_total <- read.delim("2023_pbp_b10_amb_trans.txt")
pbp_2023_vbid <- read.delim("2023_pbp_b10_b19b_amb_trans_vbid_uf.txt")