[R] backslash c
Charles C. Berry
cberry at tajo.ucsd.edu
Tue Aug 7 22:33:11 CEST 2007
Mikkel,
As
RSiteSearch("backslash")
would have shown you, this is a FAQ.
Your second attempt is correct.
To understand why, see the R FAQ
7.37 Why does backslash behave strangely inside strings?
Chuck
On Tue, 7 Aug 2007, Mikkel Grum wrote:
> How do I get output with "\color{blue}", i.e. with
> only one backslash???
>
>> "\color{blue}"
> [1] "color{blue}"
> Warning messages:
> 1: '\c' is an unrecognized escape in a character
> string
> 2: unrecognized escape removed from "\color{blue}"
>> "\\color{blue}"
> [1] "\\color{blue}"
>>
>
> Any help greatly appreciated.
>
> Best regards,
> Mikkel
>
>> sessionInfo()
> R version 2.5.1 (2007-06-27)
> i386-pc-mingw32
>
> locale:
> LC_COLLATE=English_Ireland.1252;LC_CTYPE=English_Ireland.1252;LC_MONETARY=English_Ireland.1252;LC_NUMERIC=C;LC_TIME=English_Ireland.1252
>
> attached base packages:
> [1] "stats" "graphics" "grDevices" "utils"
> "datasets" "methods"
> [7] "base"
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
Charles C. Berry (858) 534-2098
Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901
More information about the R-help
mailing list