I want to analyze this dataset on a system that limits the imports to 100MBs at a time.
How should one split a dataset, per rows, into a max of 100MBs parts?
purrr
Here is the script I used:
trade = read.csv("commodity_trade_statistics_data.csv")
no_of_chunks <- 14
f <- ceiling(1:nrow(trade) / nrow(trade) * 14)
res <- split(trade, f)
library(purrr)
map2(res, paste0("chunk_", names(res), ".csv"), write.csv)