From ?truncate:
truncatetruncates a file open for writing at the current position. It works only for connections fileand is not implemented on all platforms: on others (including Windows) it will not work for large files (> 2Gb).
What is the reason for 2Gb limitation for Windows? Does it matter if it is 64-bit Windows or NTFS? Does the version of Windows (XP, 7, 8, 10) matter?
Is there a built-in R function or a function in some R package that has the same effect on Windows as truncateon Unix-like systems?
source
share