Re: [R] Calculating the trading days

2009-07-18 Thread spencerg
You also need to know which days are trading vs. non-trading days. To find functions to provide this additional information, I first tried the following: library(RSiteSearch) td <- RSiteSearch.function('trading days') HTML(td) This produced nothing. Therefore, I divided the task

Re: [R] Calculating the trading days

2009-07-16 Thread Girish A.R.
Hi Ravi, See if the following helps: = Lines <- "Date1 Date2 29-Dec-06 25-Jan-07 29-Dec-06 25-Jan-07 29-Dec-06 25-Jan-07 2-Jan-07 25-Jan-07 2-Jan-07 25-Jan-07 2-Jan-07 25-Jan-07" DF <- read.table(con<- textConnection(Lines), skip = 1) close(con); names(DF) <- scan(textCo

[R] Calculating the trading days

2009-07-16 Thread Ravi S. Shankar
Hi R, I have two columns of date in a CSV file in the below format 29-Dec-06 25-Jan-07 29-Dec-06 25-Jan-07 29-Dec-06 25-Jan-07 2-Jan-0725-Jan-07 2-Jan-0725-Jan-07 2-Jan-0725-Jan-07 I read in R using dat<-read.csv("Z:\\data.csv"). > class(dat[,1]) [1] "