I have this code
myvector <- c(3.45235, 1.32525, ... , 2.41351) # some numbers write(myvector, \"C:/mypath/myfile.txt\") # I use \"/\" instea
It happens when you open the myfile.txt and run the code. Try to close the myfile.txt in your machine and run the command. It solves your problem.