This is a simplified version of my current problem. I need to create a model.matrix from 2 model matrices, without loosing the info in "assign". For example, consider data and formula

```
y<-rnorm(100); x1<-rnorm(100); x2<-rnorm(100); x3<-rnorm(100)
f1 <- y ~ x1 + x2 + x3

```

and 2 model matrices `X1` and `X2` created using 

```
trms<-terms.formula(f1)
trms2<-drop.terms(trms, dropx = 2)
trms3<-drop.terms(trms, dropx = -2)
X1<-model.matrix(trms2)
X2<-model.matrix(trms3)

```

Is there an easy way to create from `X1` and `X2` a matrix `X` with 1 intercept column and with `attr(,"assign")` that would have been obtained from `f1`?