How should csv files be read in R such that the entire content of csv file is one entry in the dataframe that is created?
Asked
Active
Viewed 22 times
1 Answers
0
Let there be multiple csv files in one directory. You get a list of tables like this:
library(tidyverse)
data <- list.files("/my/data/dir") %>% map(read_csv)
or using base R:
data <- lapply(list.files("/my/data/dir"), read.csv)
danlooo
- 8,933
- 1
- 6
- 21