简体   繁体   中英

R running with Command Line Error: '\U' used without hex digits in character string starting “'C:\U”

I am using R just to plot graph calculated from another executable jar file(vdjtools-1.0.7) compiled into Java.

For example when I run into the Command Line:

C:\\Users\\Lucy\\Desktop\\mixcr-1.7.1\\R\\R-3.2.4revised\\bin\\java –Xmx3g –jar vdjtools-1.0.7.jar PlotFancySpectratype inputFile.txt outputFile

It runs the program vdjtools properly because I have a correct output txt file but it doesn't give a pdf file generated by R with the plot like it should:

...[Fri Apr 01 12:00:58 CEST 2016 PlotFancySpectratype] Writing output and plotting data

[RUtil] Executing Rscript ebe147b7-6ae1-4d23-9d40-17832213fe29_fancy_spectratype.r Plot.fancyspectra.txt Plot.fancyspectra.pdf Clonotype TRUE

[ERROR] Erreur : '\\U' non suivi de chiffres hexadécimaux dans la chaîne de caractères débutant ""C:\\U" Exécution arrêtée

I know that R doesn't like '\\' and it should be instead '/' or '\\' but when I write the path to directory with '/' or '\\' into the command line, it gives the same result..

Hope someone can help me..

I will use some technical terms in my answer. I hope you are ok with that.

Well, the error is occuring because of the fact that R treats '\\' as part of escape character. That's why it is taking '\\U' as a single unit and showing the error.

Solution:

1) As you mentioned in your question, use '/' instead of '\\'

or

2) Use '\\\\' instead of '\\'.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM