To delete a file in R, you can use the file.remove()
function.
Syntax:
main.r23 chars2 lines
where file.path
is the path of the file to be removed.
Example:
Let's say, we have a file named example.txt
in our working directory that we want to delete, then the following code can be used to delete the file:
main.r27 chars2 lines
Note:
file.remove()
will give an error.file.remove()
will give a warning.gistlibby LogSnag