I initially wrote a script that does calculation running through ~70k iterations, I was using rbind to 'stitch' the outcomes together (1 iteration can result in outcome with 0 to many rows, so I don't think pre-allocating the output makes sense). To speed things up I've split this into 4 separate scripts that each handle 25% of the iterations in separate sessions and write their solutions (each between 150k-400k rows) to csv, which are all read back into a single script to bind the solutions together
I'm having a problem with one of the columns though - it contains a date, in the csv they're stored as "dd-mm-yy" ... Scripts 1, 2 & 4 read in as anticipated - they're stored as 'character' type which is fine by me. However script 3 reads in the date column as an IDate and adds "00" at the front of the string
The rbind doesn't like having different data types, I can 'make it work' by including colClasses = c(DATE = "character") in the fread for file 3, however I'd much rather understand WHY it is occurring and assume I can probably adjust something at the fwrite stage?