Supposing 'inmatrix' is a matrix with coloumn names 'x1', 'x2' and 'x3'; how about something like
model.matrix(~ (x1 + x2 + x3)^2 + log(x1) + log(x2) + log(x3) +
sqrt(x1) + sqrt(x2) + sqrt(x3) - 1,
as.data.frame(inmatrix))
--
Bjørn-Helge Mevik
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
