[R] How to pass a string as an argument to a function?

Vladimir Eremeev wl2776 at gmail.com
Wed Sep 19 20:00:52 CEST 2007


lme(as.formula(paste("y~",ww)),random=~1|subj,model)


Gang Chen-3 wrote:
> 
> I want to pass a predefined string ww ("fa*fb+fc") to function lme so  
> that I can run
> 
>  > lme(y ~  fa*fb+fc, random = ~1|subj, model)
> 
> There must be a simple way to do this. Any help?
> 
> Thanks,
> Gang
> 

-- 
View this message in context: http://www.nabble.com/How-to-pass-a-string-as-an-argument-to-a-function--tf4482519.html#a12782865
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list