[R] invalid \uxxxx sequence while trying to create a package

Charles Annis, P.E. Charles.Annis at StatisticalEngineering.com
Wed Mar 19 02:37:47 CET 2008


Thank you Duncan:

I found the culprit - my menu contains lines like this one:

winMenuAdd(menuname = "mh1823/\u00e2 vs a/2.  Build \u00e2 vs a Linear
Model")

This does produce a menu item that looks like â vs a and since R doesn't
seem to like the a-hat character I tried to get around the objection with
the corresponding Unicode character(s), obviously with no success.

The menu works perfectly well, but can't be packaged as it currently is
using R CMD build --binary March18.  Is there no way for me to package the
menu?  

Thanks, again.

Charles Annis, P.E.

Charles.Annis at StatisticalEngineering.com
phone: 561-352-9699
eFax:  614-455-3265
http://www.StatisticalEngineering.com
 
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Duncan Murdoch
Sent: Tuesday, March 18, 2008 6:08 PM
To: Charles.Annis at statisticalengineering.com
Cc: r-help at r-project.org
Subject: Re: [R] invalid \uxxxx sequence while trying to create a package

On 18/03/2008 5:17 PM, Charles Annis, P.E. wrote:
> Greetings, R-Helpers:
> 
>  
> 
> I am trying to build a package on WinXP, something that I have done
before,
> but infrequently, and have recently updated both the Rtools and the
version
> of R being used.
> 
>  
> 
> My test case fails after successfully creating the compiled html files
with
> this error message:
> 
> .
> 
> .
> 
> .
> 
> Created
>
c:\DOCUME~1\CHARLE~1\LOCALS~1\Temp\Rbuild142865646\March18\chm\March18.chm,
> 41,494 bytes
> 
> Compression decreased file by 50,957 bytes.
> 
>   preparing package March18 for lazy loading
> 
> Loading required package: rcom
> 
> Loading required package: RODBC
> 
> Loading required package: RColorBrewer
> 
> Loading required package: survival
> 
> Loading required package: splines
> 
> Error in parse(n = -1, file = file) : invalid \uxxxx sequence
> 
> Calls: <Anonymous> -> code2LazyLoadDB -> sys.source -> parse
> 
> Execution halted
> 
> make: *** [lazyload] Error 1
> 
> *** Installation of March18 failed ***
> 
>  
> 
> Removing 'C:/DOCUME~1/CHARLE~1/LOCALS~1/Temp/Rinst142800030/March18'
> 
>  
> 
>  
> 
> While I can clearly read that the problem is invalid \uxxxx sequence I
don't
> know what it means nor how to remedy it. 
> 
>  
> 
> Helpful suggestions would be greatly appreciated.

The \uxxxx sequences are Unicode characters.  The xxxx are supposed to 
be hexadecimal digits.  So you might have something like

cat("\u00B7")

to display a dot.  "Invalid" means it's not recognized, or not well-formed.

So what I'd suggest is to search your source code for \u, and see if you 
inadvertantly included this for some other purpose.  Alternatively, it's 
possible something has translated a non-Ascii character into a \uxxxx 
sequence; I don't know what might have done that.

If none of that works, you could try reporting on what versions of 
everything you're using.  You didn't mention that yet.  And if they are 
all currrent versions (R 2.6.2, Rtools 2.7) then I guess you'll just 
have to divide and conquer: cut out half the source code and see if you 
still get the error.  If so, cut it again, if not, look in the other half.

Duncan Murdoch

______________________________________________
R-help at r-project.org 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.



More information about the R-help mailing list