I have multiple csv files (1 file for each city) having following structure.
An example of two out of many files:
CSV File 1:
City_Name Pop PopDen Lit
MI 45000 280 78
MI 37000 310 89
...
...
CSV File 2:
City_Name Pop PopDen Lit
CH 97000 150 74
CH 67000 220 82
...
...
I want to import these csv files into SQL database as 1 table using R. I am not able to find a function to do it. Could anyone please help.
Desired Output (1 Table in SQL):
City_Name Pop PopDen Lit
MI 45000 280 78
MI 37000 310 89
...
...
CH 97000 150 74
CH 67000 220 82
...
Using read.csv() is not a good option to import multiple large CSV files into R Data Frame. In order to read multiple CSV files or all files from a folder in R, use data.table package. data.table is a third-party library, you need to first install it by using install.packages('data.table').