Re: [R] Executing a function correctly

2011-07-15 Thread saskay
Marc, Many thanks. -- View this message in context: http://r.789695.n4.nabble.com/Executing-a-function-correctly-tp3665765p3670602.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/m

Re: [R] Executing a function correctly

2011-07-13 Thread Marc Schwartz
On Jul 13, 2011, at 1:38 PM, saskay wrote: > Hello All, > I've created a function as follows so as to use it in a loop. > > freq<-function(i) > { > library(RODBC) > paste(i,"<-sqlQuery(conn,","'","select click_flg, open_flg,", i ," from > modeling_5')",sep="") > } > > freq(i="AQI") > [1] "AQI<

[R] Executing a function correctly

2011-07-13 Thread saskay
Hello All, I've created a function as follows so as to use it in a loop. freq<-function(i) { library(RODBC) paste(i,"<-sqlQuery(conn,","'","select click_flg, open_flg,", i ," from modeling_5')",sep="") } freq(i="AQI") [1] "AQI<-sqlQuery(conn,'select click_flg, open_flg,AQI from modeling_5')"