Going through the documentation filecaught my attention:
Tfile <- file()
cat("abc\ndef\n", file = Tfile)
readLines(Tfile)
close(Tfile)
What is this anonymous file? Does it exist on disk or only in memory? This interests me because I am considering a program that would potentially have to create / delete thousands of temporary files, and if this happens only in memory, it looks like it will have less impact on system resources.
This linux SO Q seems to suggest that this file may be a real file on disk, but I'm not sure how relevant this particular example is. Also, this large memory file seems to hint at real disk storage (although I assume anonymous file fileb):
It should also be noted that the user can create an "anonymous" big.matrix file array by specifying "" as an argument to cancel the file. In this case, the backup is located in the temporary directory and the descriptor file is not created. They should be used with caution, since even anonymous databases use disk space, which can eventually fill the hard drive. Anonymous backups are deleted either manually or by the user, or automatically when the operating system considers it appropriate.
Alternatively, if textConnectionsuitable for use for this type of application (open / closed hundreds / thousands of times) and is only memory that will satisfy my needs. I planned to do this until I read the note in this function documentation:
, , () .