Displaying 1 result from an estimated 1 matches for "q_ins".
2008 Oct 07
1
FW: Reading Data
...e i have
problem with the date format and also with the stocks name
data=read.table("H:/Rahul/london/david/rexcel/price.txt")
query=read.table("H:/Rahul/london/david/rexcel/prac.txt",header=TRUE)
data=as.matrix(data)
instrument=data[,1]
date=data[1,]
query=as.matrix(query)
q_ins=query[,1]
wt=query[,2]
q_sd=query[,3]
q_ed=query[,4]
returns=function(I,SD,ED){
p=rep(0,2)
for(i in 2:length(instrument))
{
if(instrument[i]==I)
{
for(j in 2:length(date))
{
if(date[j]==SD)...