On Jan 29, 2010, at 4:58 PM, mary guo wrote:
Hi,
I want to use a character as below in R,
What character?
as.character("`X^`R\`S")
[1] "`X^`R`S"
Warning messages:
1: '\`' is an unrecognized escape in a character string
2: unrecognized escape removed from "`X^`R\`S"
> nchar("`X^`R\`S")
[1]
oject.org] On
Behalf Of mary guo
Sent: Friday, January 29, 2010 1:58 PM
To: r-help@r-project.org
Subject: [R] How to use escape characters in a string
Hi,
I want to use a character as below in R,
as.character("`X^`R\`S")
[1] "`X^`R`S"
Warning messages:
1: '\`' i
Hi,
I want to use a character as below in R,
as.character("`X^`R\`S")
[1] "`X^`R`S"
Warning messages:
1: '\`' is an unrecognized escape in a character string
2: unrecognized escape removed from "`X^`R\`S"
But I found errors.
Can I use some option in as.character() to change this?
Thanks
Mary
3 matches
Mail list logo