From kmillar at google.com  Sat Feb 27 00:58:20 2016
From: kmillar at google.com (Karl Millar)
Date: Fri, 26 Feb 2016 15:58:20 -0800
Subject: [Rd] [patch] Support many columns in model.matrix
Message-ID: <CABz6aZdZvLr=3_8yOqPr+_HYu-Vi=XQD5vKc8zATt0pFMUtypQ@mail.gmail.com>

Generating a model matrix with very large numbers of columns overflows
the stack and/or runs very slowly, due to the implementation of
TrimRepeats().

This patch modifies it to use Rf_duplicated() to find the duplicates.
This makes the running time linear in the number of columns and
eliminates the recursive function calls.

Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stats_model.patch
Type: text/x-patch
Size: 2182 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20160226/b54f1cc2/attachment.bin>


[Rd] [patch] Support many columns in model.matrix
Karl Millar