• R语言
  • HOWTO get string "N a" by "paste" command?

hello all,



I want to get a string "\N a" by "paste", but when i try:

> paste("\N", "a")

following error(warning) happened:

> paste("\N", "a")

[1] "N a"

Warning messages:

1: '\N' is an unrecognized escape in a character string

2: unrecognized escape removed from "\N"



and then i tried:

> paste("\\N","a")

[1] "\\N a"

the result is not i want to get at all.



how should i deal with this problem? Thanks a lot
I found just printed out the "\\N a" to file, or use "cat" i could get what i want



but it seems like impossible to get a vector "\N" in R
我试了一下,确实不行,期待高手。
<br />
> paste("//N", "a")<br />
[1] "//N a"<br />
> paste("/N", "a")<br />
[1] "/N a"<br />
> paste("\N", "a")<br />
[1] "N a"<br />
Warning messages:<br />
1: 不认识字符串里'\N'这样的逸出号 <br />
2: 从"\N"里删除了不认识的逸出号 <br />
> paste("\\N", "a")<br />
[1] "\\N a"<br />
果然啊!哈哈,确实强!只是N能怎么能变成大写的啊?