[R-sig-ME] GLS, as.formula and subsitute
Christoph Scherber
Christoph.Scherber at agr.uni-goettingen.de
Tue May 14 10:32:18 CEST 2013
Dear all,
I am trying to feed a formula object into GLS using substitute() and as.formula(). What am I doing
wrong here?
##
models <- function(resp=quote(resp),DF=quote(DF)) {
f1=substitute(resp~Time,list(resp=quote(resp)))
gls(as.formula(f1),data=DF)
}
models(resp="follicles","Ovary")
##
Many thanks for your help!
Best wishes
Christoph
--
PD Dr Christoph Scherber
Georg-August University Goettingen
Department of Crop Science
Agroecology
Grisebachstrasse 6
D-37077 Goettingen
Germany
phone 0049 (0)551 39 8807
fax 0049 (0)551 39 8806
http://www.gwdg.de/~cscherb1
More information about the R-sig-mixed-models
mailing list