Disabling the slash in r doesn't work
I read that if you want to insert a backslash in a string, you need to avoid it:
a <- "\\"
The problem is, if I do this, I get two slashes in my string!
> a <- "\\"
> a
[1] "\\"
How can I only get one backslash in my string?
+3
Dario lacan
source
to share
1 answer
You don't actually have two backslashes - actually one character :-)
Check it:
a <- "\\"
nchar(a)
# [1] 1
cat(a)
# \
+6
A5C1D2H2I1M1N2O1R2T1
source
to share