Skip to content
Prev 132158 / 398506 Next

Rd files with unknown encoding?

Dear Prof. Ripley: 

      Thanks very much.  I did as you suggested, which I'll outline here 
to make it easier for anyone else who might have a similar problem: 

           * Read the offending *.Rd file in R using 'readLines' 

           * Applied 'iconv' to the character vector, following the last 
example in the help file.  This translated all offending characters into 
a multi-character sequence starting with '<'. 

           * Used 'regexpr' to find all occurrences of '<'. 

      The latter identified other uses of '<' but produced a 
sufficiently short list that I was able to find the problems fairly 
easily. 

      Thanks again.
      Spencer Graves   
p.s.  And in the future, I will refer 'Rd' questions to 'R-devel', per 
your suggestion.
Prof Brian Ripley wrote: