From jean-luc.lipatz at insee.fr  Tue Jul  4 11:40:18 2017
From: jean-luc.lipatz at insee.fr (Lipatz Jean-Luc)
Date: Tue, 4 Jul 2017 09:40:18 +0000
Subject: [Rd] write.csv
Message-ID: <FEF25E56AFC7064784FA97C576467E0AC7ACBE68@pdexchbalwst01.ad.insee.intra>

Hi all,

I am currently studying how to generalize the usage of R in my statistical institute and I encountered a problem that I cannot declare on bugzilla (cannot understand why). Sorry for trying this mailing list but I am really worried about the problem itself and the possible implications in using R in a professionnal data production context.
The issue about 'write.csv' is that it just doesn't check if there is enough space on disk and doesn't report failure to write data.

Example (R 3.4.0 windows 32 bits, but I reproduced the problem with older versions and under Mac OS/X)

> fwrite(as.list(1:1000000),"G:/Test")
Error in fwrite(as.list(1:1e+06), "G:/Test") :
  No space left on device: 'G:/Test'
> write.csv(1:1000000,"G:/Test")
>

I have a big concern here, because it means that you could save some important data at one point of time and discover a long time after that you actually lost them. I suppose that the fix is relatively straightforward, but how can we be sure that there is no another function with the same bad properties? Is the lesson that you should not use a R function, even from the core, without having personnally tested it against extreme conditions? And wouldn't it be the work of the developpers to do such elementary tests?

Thanks


Jean-Luc LIPATZ
Insee - Direction g?n?rale

Responsable de la coordination sur le d?veloppement de R et la mise en oeuvre d'alternatives ? SAS






	[[alternative HTML version deleted]]



[Rd] write.csv
Lipatz Jean-Luc