Closed rabutler closed 7 years ago
This was found while testing the contents of reading in csv and txt files that were saved using fwrite()
Think that we want to keep the Variable as a character, even this will have some size disadvantages. Since the defaults of data.table::fread()
and readr::read_xxx()
are both to keep the strings as not factors, lets go with that for now.
For a 2000 row data frame, the version that has variable as a character is 65 kb, while it is 57 kb if it is stored as a factor. (about 14% bigger)
Why does
getDataForAllScens()
return year as a character, and why does it return Variable as a factor?If dealing with annual data, it returns year as numeric, but Variable as a factor, while it returns year as a character and Variable as a character if dealing with monthly data.