[R] Why "\\" instead of simple "/" to specify a file path

David Winsemius dwinsemius at comcast.net
Mon Mar 22 19:51:57 CET 2010

On Mar 22, 2010, at 1:22 PM, Bogaso wrote:

> Hi all,
> I have saved my workplace in a .RData format. However if I want to  
> open
> that, I need to use following code :
> load("C:\\......")
> Here my question is why "\\". In all the time generally we use "/"  
> like when
> we use read.delim() function etc. Is there any possibility to have  
> some
> consistency there?

Depends what you mean by consistency. The same rule applies on all  
current supported OS platforms. Doubling the back-slashes is needed  
because "\" is an "escape character".

> Is there any other way to re-open the .RData file?

If your OS supports it you may be able to use drag-drop with file  
icons or you can use file.choose()

> Thanks,
> -- 
> View this message in context: http://n4.nabble.com/Why-instead-of-simple-to-specify-a-file-path-tp1677973p1677973.html
> Sent from the R help mailing list archive at Nabble.com.
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list