[Rd] Bug in as.character? (PR#14206)

Peter Dalgaard P.Dalgaard at biostat.ku.dk
Fri Feb 5 10:34:27 CET 2010

Havard.Rue at math.ntnu.no wrote:
> A long formula which is converted using as.character, looses its last
> part: ``diagonal = 1e-12)'' 
> Shorter formula is ok though.

(If you have to put a ? in a bug report, ask instead!)

This is entirely consistent with  help(as.character):


     ‘as.character’ truncates components of language objects to 500
     characters (was about 70 before 1.3.1).

If you insist on working with very long formulas in their character
representation, you need to use deparse() and deal with the resulting
multi-line character vectors. (I can't tell what you're trying to do,
but update.formula() may provide a cleaner way of modifying formulas.)

   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907

More information about the R-devel mailing list