Given:

> filename<-paste(tempdir(),"\\","myfile.txt",sep="");
> sub("\\\\","/",filename);
[1] "C:/DOCUME~1\\AJAYAS~1\\LOCALS~1\\Temp\\Rtmp2f270T\\myfile.txt"


Note: Only the first occurence of \\ is replaced. What is the syntax for replacing every occurence?

Thanks.

	[[alternative HTML version deleted]]

