> Karl Millar
> on Mon, 29 Feb 2016 10:22:51 -0800 writes:
> Thanks.
> Couldn't you implement model.matrix(..., sparse = TRUE) with a small
> amount of R code similar to MatrixModels::model.Matrix ?
yes, and basically call R level Matrix::sparse.model.matrix()
[[ or eve
Thanks.
Couldn't you implement model.matrix(..., sparse = TRUE) with a small
amount of R code similar to MatrixModels::model.Matrix ?
On Mon, Feb 29, 2016 at 10:01 AM, Martin Maechler
wrote:
>> Karl Millar via R-devel
>> on Fri, 26 Feb 2016 15:58:20 -0800 writes:
>
> > Generati
> Karl Millar via R-devel
> on Fri, 26 Feb 2016 15:58:20 -0800 writes:
> 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_duplic
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