Untitled
unknown
plain_text
2 years ago
572 B
9
Indexable
n.values <- c(500, 1000, 2000) iterations <- 3 # Define the different parts of the file names sizes <- c(500, 1000, 2000) indices <- 1:3 folder <- "Data" # Generate the file names dynamically file_names <- paste0("dat_", rep(sizes, each = length(indices)), "_", rep(indices, times = length(sizes))) file_paths <- file.path(folder, paste0(file_names, ".csv")) # Read the files and assign them to a list data_list <- setNames(lapply(file_paths, fread), file_names) # Assign the list elements to variables in the global environment list2env(data_list, envir = .GlobalEnv)
Editor is loading...