; > -Original Message-
> > From: R-devel [mailto:r-devel-boun...@r-project.org] On Behalf Of
> Spencer
> > Graves
> > Sent: October 3, 2016 7:59 PM
> > To: r-devel@r-project.org
> > Subject: [Rd] suggested addition to model.matrix
> >
> > Hello, All:
&
me and a formula.
Best,
John
> -Original Message-
> From: R-devel [mailto:r-devel-boun...@r-project.org] On Behalf Of Spencer
> Graves
> Sent: October 3, 2016 7:59 PM
> To: r-devel@r-project.org
> Subject: [Rd] suggested addition to model.matrix
>
> Hello, All:
>
&g
Hello, All:
What's the simplest way to convert a data.frame into a model.matrix?
One way is given by the following example, modified from the
examples in help(model.matrix):
dd <- data.frame(a = gl(3,4), b = gl(4,1,12))
ab <- model.matrix(~ a + b, dd)
ab0 <- model.matrix(~., dd