Skip to content
Prev 170746 / 398506 Next

Using eval in multinom argument

Thanks for your help,

I managed to get it working like this:

fml<-as.formula(paste("y ~", paste(PCnames, collapse="+")))
y = class.ind(grp[outgroup])
z1=multinom(formula = fml, data=data.frame(scores))

Daniel Crouch



**********QUOTE:********
Forget eval(parse(text = ))

See

 	?as.formula
 	?update.formula

and try out the example() s there.

HTH,

Chuck
On Mon, 16 Feb 2009, Crouch, Daniel wrote:

            
Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901





Daniel Crouch
Research Student
Department of Medical & Molecular Genetics
King's College London
8th Floor, Tower Wing
Guy's Hospital
London SE1 9RT
United Kingdom