On Sun, Nov 15, 2009 at 9:58 AM, Jari Oksanen <jari.oksa...@oulu.fi> wrote: > On 15/11/09 16:35 PM, "jo...@web.de" <jo...@web.de> wrote: > >> Full_Name: Jens Oehlschlägel >> Version: 2.10.0 >> OS: Windows XP Professional >> Submission from: (NULL) (85.181.158.112) >> >> >> file.rename() will successfully rename file a to b - even if b exists >> already. >> Though the documentation does not state what file.rename() will do in this >> case, >> I guess the expected behaviour is to fail and return FALSE. > > The *expected* behaviour is to overwrite the old file. Your expectation > seems to be different, but overwriting or deleting the old file has been the
On UNIX the expected behavior would be to overwrite but on Windows the rename command does not overwrite silently but fails so I think his expectation is in line with how Windows works at the command line level. It might be worthwhile to have an overwrite= argument on file.rename to control this. If it defaulted to TRUE then the expectation would be clear regardless of platform. ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel