[R] how to put \ in a string?

weix1 weix1_2007 at hotmail.com
Fri Apr 23 18:37:05 CEST 2010


I have string as follows:"v:\work\gene" 
however, i can not write this as character string in R
what i did is:
path<- as.character("v:\work\gene")

but it seems that \ is eliminated:
Warning messages:
1: '\w' is an unrecognized escape in a character string 
2: '\g' is an unrecognized escape in a character string 
3: unrecognized escapes removed from "v:\work\gene" 
> path
[1] "v:workgene"

how can i keep the \ in string.

thanks

-- 
View this message in context: http://r.789695.n4.nabble.com/how-to-put-in-a-string-tp2062483p2062483.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list