How to rename the file in R

r

#1

I want to rename the file mytest2.R to mytest3.R but I am getting false as a result
file.rename(“mytest2.R”,“mytest3.R”)
[1] FALSE


#2

Hello @sid100158,

You will have to set the working directory of R to where the file resides.

Hope this helps!!