I have a script created in R
and every time it is executed it leaves two files in the folder, a .Rdata and a .RHistory.
I have put this at the end of my script, but it does not work since you see that it creates the files once it is finished.
if (file.exists(".RData") == TRUE) {
file.remove(".RData")
}
if (file.exists(".Rhistory") == TRUE) {
file.remove(".Rhistory")
}
I have to say that I'm pretty new at this.
Thanks for your help.