how to delete a file with R? [duplicate]
How about: #Define the file name that will be deleted fn <- “foo.txt” #Check its existence if (file.exists(fn)) { #Delete file if it exists file.remove(fn) } As far as I know, this is a permanent, non-recoverable (i.e. not “move to recycle bin”) on all platforms …