[Rd] Long model specification causes aov() to abort with error

Jan Hauffa jh@u||@ @end|ng |rom gm@||@com
Sat Apr 11 15:51:49 CEST 2020


Dear R developers,

while experimenting with repeated measures ANOVA, I found out that it is 
possible to construct a model specification that is syntactically valid, 
but causes aov() to abort with an error. A minimal reproducer and its 
output are attached to this mail. I was able to reproduce this problem 
with the latest SVN revision.

The root cause is similar to that of bug 15377: aov() calls deparse() on 
the model specification. If the resulting string is too long, e.g. due 
to long column names, deparse() performs line breaking and returns a 
vector of strings, which aov() does not handle correctly.

The attached patch fixes this problem by making aov() call deparse1(). 
It also corrects an error in the documentation of deparse1().

Please CC me on replies as I am not subscribed to the mailing list.

With best regards,
   Jan Hauffa

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: aov.diff
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20200411/155d7990/attachment.ksh>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: error.txt
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20200411/155d7990/attachment.txt>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: testcase.R
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20200411/155d7990/attachment-0001.ksh>


More information about the R-devel mailing list