[R] invalid strings while parsing code with inlinedocs package.skeleton.dx()

Jannis bt_jannis at yahoo.de
Thu Sep 8 11:45:28 CEST 2011


Seems as whether I found a (clumsy) workaround:

1. options(warn =2)
2. run package.skeleton.dx, now an error is produced with the name of 
the file package.skeleton was actually working on
3. The number of the erroneous input string should correspond to the 
line number in that file.

Just in case anybody is digging for the same solution ;-)

Jannis



On 09/08/2011 11:18 AM, Jannis wrote:
> Dear list members,
>
>
> I use the package inlinedocs to create documentation for a package 
> that I am building. The function package.skeleton.dx() is used to 
> convert the source *.R file into the *.Rd documentation file. Usually 
> this works like a charm, but on several occasions I got messages like 
> this one:
>
>
>
> extra.code.docs prefixed.lines extract.xxx.chunks title.from.firstline 
> examples.from.testfile definition.from.source edit.package.file 
> author.from.description erase.format title.from.name examples.in.attr 
> collapse tag.s3methods
> Creating directories ...
> Creating DESCRIPTION ...
> Creating Read-and-delete-me ...
> Copying code files ...
> Making help files ...
> Done.
> Further steps are described in './spectral.methods/Read-and-delete-me'.
> Modifying files automatically generated by package.skeleton:
> add.axis: definition title description item{side} item{trans.fun} 
> item{label} item{\dots} seealso author format
> best.iter.default: definition description item{perf.matrix} details 
> seealso author value format title
> determine.freq: title description item{series} item{plot.periodogram}
>
> <long list of the functions in my package>
> ...
>
> Warning message:
> In grep(prefix, src) : input string 65 is invalid in this locale
>
>
> The warning message, however, gives me no hint on in which file and in 
> which position (maybe line 65?) the invalid string can be found. On 
> some occasions I was able to manually find these strings because I 
> remembered which file I recently worked on. One of such errors was for 
> example caused by a í instead of a i (can you see the difference?). 
> Additionally I have the impression that an error is caused while using 
> R-2.10 and only a warning is caused with 2-12.
>
> Is there any convenient way of finding out where exactly this 
> erroneous string is? I tried to execute package.skeleton.dx() row wise 
> but the function quickly branches into a complex nesting of other 
> functions.
>
>
>
> Thanks for any advice!
>
> Jannis
>
> ______________________________________________
> 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