Displaying 2 results from an estimated 2 matches for "caldt".
2010 Mar 30
1
dataframe in loop
...ndno 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't work:( I realize it might be the problem that I didnt
define the dataframe, but my limited knowledge cant help me find out
how..
I will give you guys a example of my data:
head(v.fundno)
test<-head(v.fundno)
test
[1] "2899&quo...
2010 Mar 24
3
string problems in R
Hello all
I have been working on my thesis using R. I am a newbie to R and met a problem
that bothered me for a while due to my lack of acquaintance of R.
I am using R to query from SQL. I got a list of crsp_fundno of G-style mutual
funds which is still alive. I use the following codes and got what I want:
library(RODBC)
channel<-odbcConnect("CRSPFUND")