[R] Strange behavior with saved character vectors containing a slash

David Kane <David Kane a296180 at mica.fmr.com
Thu Oct 4 12:58:26 CEST 2001

I am seeing some strange behavior using save on a character vector containing a
slash. If this is a bug, I will happily submit it (as a single entry! ;-) ) to
r-bugs. Here is an example involving "VIA\B".

> version
platform sparc-sun-solaris2.6
arch     sparc               
os       solaris2.6          
system   sparc, solaris2.6   
major    1                   
minor    3.0                 
year     2001                
month    06                  
day      22                  
language R                   
> ls()
> test <- "VIA\\B"	# I proceed the \ with another to escape it.
> cat(test, "\n")
VIA\B			# This is how the string should look.
> save(test, ascii = TRUE, file = "here")
> remove(list = ls())
> ls()
> load("here")
> ls()
[1] "test"
> cat(test, "\n")
VIAB		# This is not how the string should look! Where did the \ go?
> unlink("here")

Any insights would be much appreciated.


Dave Kane
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list