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

Jannis bt_jannis at yahoo.de
Thu Sep 8 11:18:57 CEST 2011

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 ...
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!


More information about the R-help mailing list