how to insert column to a model.matrix

43 Views Asked by At

I want insert two variables into a model.matrix, but I don't know how to do that

> k<-model.matrix(m2)
> dim(k)

[1] 475 28

k$township72<-rep(0,475)
Warning message:
In k$township72 <- rep(0, 475) : Coercing LHS to a list
0

There are 0 best solutions below