[R] Error: Line starting ' ...' is malformed!
Ross Boylan
ross at biostat.ucsf.edu
Tue Jul 30 19:45:58 CEST 2013
On Monday, July 29, 2013 07:47:34 AM MacQueen, Don wrote:
> A recent version of the R extension manual says,
>
> "For maximal portability, the ‘DESCRIPTION’ file should be written
> entirely in ASCII — if this is not possible it must contain an ‘Encoding’
> field (see below)."
>
> It also says, regarding the DESCRIPTION file,
>
> "Fields start with an ASCII name immediately followed by a colon: the
> value starts after the colon and a space."
That, plus the fact that all the other files were in plain ASCII, convinced me
to recode DESCRIPTION to ASCII. Which solved the problem.
I guess, at least in this context, ASCII is considered an encoding as well as
a character set.
Thanks.
Ross
P.S. For the record, I used recode on linux to do the conversion; iconv is
another utility that would probably work.
>
> >A DESCRIPTION file begins with 0xFFFE and
> >$ file DESCRIPTION
> >DESCRIPTION: Little-endian UTF-16 Unicode text, with CRLF, CR line
> >terminators
> >
> >I think it was created on Windows.
> >
> >In R (2,15,1 on Debian GNU/Linux), using roxygen2, I get
> >
> >> roxygenize("../GitHub/mice")
> >
> >Error: Line starting '��P ...' is malformed!
> >
> >Enter a frame number, or 0 to exit
> >
> >1: roxygenize("../GitHub/mice")
> >2: read.description(DESCRIPTION)
> >3: read.dcf(file)
> >
> >Selection: 3
> >Called from: read.description(DESCRIPTION)
> >Browse[1]> Q
> >
> >I'm not sure if the first 2 characters after line starting ', which are
> >octal
> >377, 376, will survive email; I stripped them out of the subject line.
> >
> >The files (DESCRIPTION isn't the only one) have also caused trouble for
> >git
> >(even on Windows 7), since it thinks they are binary.
> >
> >Any advice about what to do?
> >
> >I'm reluctant to change the format of the files because it's not my
> >package.
> >
> >Ross Boylan
> >
> >______________________________________________
> >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