Dear R community:

I am working on a model frame problem which is important for my data
analysis. What I am trying to get is to get data set d3 through the model
formula "ff=y~a+b+a*b" and data set d1 to generate a new data set d3 rather
than d2. I have tried several ways but did not get that done. I would
greatly appreciate any help. The codes are listed as follows:

Jixiang Wu

a=c(1:10)
b=c(1:10)
ab=paste(a,b,sep="*")

d1=data.frame(y=rnorm(10),a=a,b=b)

ff=y~a+b+a*b
d2=model.frame(ff,d1)  ## this generate from model.frame
d2

d3=data.frame(y=rnorm(10),a=a,b=b,ab=ab)  ## this is what I need
d3

	[[alternative HTML version deleted]]

