search for: monthly_return

Displaying 2 results from an estimated 2 matches for "monthly_return".

Did you mean: monthly_returns
2010 Mar 24
3
string problems in R
...) g$key<-paste(g.crspfundno$crsp_fundno) y$key<-paste(y.crspfundno$crsp_fundno) v.fundno<-intersect(g$key,y$key) (using intersect to get crsp_fundno of G-style mutual funds which is still alive.) v.fundno What i need to do next is using the v.fundno I got to query from another table "Monthly_return" to get the mret coresponding to every v.fundno. I have only a basic idea of the code: for (i in 1:length(v.fundno)){ gmret<-sqlQuery(channel,"select mret from Monthly_returns where crsp_fundno = toString(v.fundno[i])") } gmret R gave me an error with undefined function "toSt...
2010 Mar 30
1
dataframe in loop
...g$key<-paste(g.crspfundno$crsp_fundno) y$key<-paste(y.crspfundno$crsp_fundno) v.fundno<-intersect(g$key,y$key) (using intersect to get crsp_fundno of G-style mutual funds which is still alive.) v.fundno What i need to do next is using the v.fundno I got to query from another table "Monthly_return" to get the mret coresponding to every v.fundno. I have only a basic idea of the code: for (i in 1:length(v.fundno)){ gmret<-sqlQuery(channel,paste("select mret from Monthly_returns where crsp_fundno =",test[i],'and caldt > 19900630 order by caldt')) } The loop doesn...