Re: [R] Applying function to all elements of a formula

2011-06-19 Thread Scott Fortmann-Roe
t) > >> > >> reg<- lm(y ~ log(as.matrix(dat[, -1])), dat) > >> > >> but the output would be pretty ugly (see summary(reg)). Another would > >> be to construct the matrix outside the data frame and do something > >> like > >> > >> X&

[R] Applying function to all elements of a formula

2011-06-18 Thread Scott Fortmann-Roe
Hi, I would like to do a regression like: reg <- lm(y~log(.), data) where the log function is applied to "." in the form: log(x1)+ log(x2)+ log(x3)... instead of in the form log(x1+x2+x3+...) Is this possible? Thank you, Scott [[alternative HTML version del