See ?as.character (which paste effectively calls on non-character objects, 
as ?paste says):

Note:

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

so it is working as documented.  Not then a bug.

You can (and probably should) use a construct like that in terms.formula:

         else paste(deparse(form[[2]]), collapse = "")

to convert a formula to a complete character string.


On Wed, 24 May 2006, [EMAIL PROTECTED] wrote:

> Hi,
> If I create a formula with say 100 terms and then paste it:
>
> xnam <- paste("x", 1:100, sep="")
> fmla <- as.formula(paste("y ~ ", paste(xnam, collapse= "+")))
> paste(fmla)
>
> The result seems to cut off everything after the first 500 characters
> and gives no warning message.
>
> I have the most recent version of R from the R website and the problem
> occurs on both Unix and Windows machines
>
> Thanks
>
> John
>

-- 
Brian D. Ripley,                  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to