[R] Rd-file error: non-ASCII input and no declared encoding

Duncan Murdoch murdoch.duncan at gmail.com
Wed Sep 1 16:26:29 CEST 2010


On 01/09/2010 10:09 AM, Christian Hennig wrote:
> Dear list,
>
> I came across the following error for three of my newly written Rd-files:
> non-ASCII input and no declared encoding
>   

I don't think the problem survived emailing, at least I didn't see it.  
You can display all the non-ASCII characters using

tools::showNonASCII( readLines(f))

where f contains the filename to check.  (What I'd suspect would be the 
quote marks.  In the original, are they directional quotes?  Those 
aren't ASCII.)

Duncan Murdoch

> I can't make sense of this.
>
> Below I copied in one of the three files.
> Can anybody please tell me what's wrong with it?
>
> Thank you,
> Christian
>
> \name{tetragonula}
> \alias{tetragonula}
> \alias{tetragonula.coord}
> \docType{data}
> % \non_function{}
> \title{Microsatellite genetic data of Tetragonula bees}
> \description{
>    Genetic data for 236 Tetragonula (Apidae) bees from Australia
>    and Southeast Asia, see  Franck et al. (2004). The data give pairs of
>    alleles (codominant markers) for 13 microsatellite loci.
> }
> \usage{data(tetragonula)}
> \format{
>    Two objects are generated:
>    \describe{
>      \item{tetragonula}{A data frame with 236 observations and 13 string
>      variables. Strings consist of six digits each. The
>      format is derived from the data format used by the software GENEPOP
>      (Rousset 2010). Alleles have a three digit code, so a value of
>      \code{"258260"} on variable V10 means that on locus 10 the two alleles
>      have codes 258 and 260. \code{"000"} refers to missing values.}
>      \item{tetragonula.coord}{a 236*2 matrix. Coordinates of locations of
>      individuals in decimal format, i.e. the first number is latitude
>      (negative values are South), with minutes and seconds
>      converted to fractions. The second number is longitude (negative
>      values are West).}
>    }
> }
> \source{
>    Franck, P., E. Cameron, G. Good, J.-Y. Rasplus, and B. P. Oldroyd
>    (2004) Nest architecture and genetic differentiation in a species
>    complex of Australian stingless bees. \emph{Mol. Ecol.} 13, 2317–2331.
>
>    Rousset, F. (2010) Genepop 4.0 for Windows and Linux.
>    \url{http://kimura.univ-montp2.fr/~rousset/Genepop.pdf}
> }
> \details{
>     Reads from example data file \code{Heterotrigona_indoFO.txt}.
> }
>
> \examples{
> data(tetragonula)
> }
> \keyword{datasets}
>
>
> *** --- ***
> Christian Hennig
> University College London, Department of Statistical Science
> Gower St., London WC1E 6BT, phone +44 207 679 1698
> chrish at stats.ucl.ac.uk, www.homepages.ucl.ac.uk/~ucakche
> ------------------------------------------------------------------------
>
> ______________________________________________
> 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