I need to import large CSV files directly as data frames. As the read.csv() function creates a list, I have to then change the list as a data frame using as.data.frame(). This is a problem for me as the CSV files are big and storing both the list and data frame will take up a lot of memory.
Since I need to merge multiple CSV files, I think using data frames will be easier as I can join the files on common attributes(columns).
So, this is what I'm doing right now:
sample <- read.csv(sample.csv)
sample_df <- as.data.frame(sample)
I need a way to import the CSV files directly as data frames.