folder <- file.path(tempdir(), "peak_csvs")
dir.create(folder, showWarnings = FALSE)
utils::write.csv(data.frame(ppm = c(1, 2), int = c(10, 20)),
file.path(folder, "sample1.csv"), row.names = FALSE)
utils::write.csv(data.frame(ppm = c(1, 3), int = c(15, 30)),
file.path(folder, "sample2.csv"), row.names = FALSE)
read_csvs_folder(folder, verbose = FALSE)
Run the code above in your browser using DataLab