Displaying 1 result from an estimated 1 matches for "correlationtests".
2011 Feb 09
1
Iterate over a list of input files?
...om start to finish
# Then remove weekends and holidays and turn into a data.frame
dd <- seq(StartDate, EndDate, by = "day")
TradingDate <- dd[!is.weekend(dd) & !is.holiday(dd)]
DateRange <- as.data.frame(TradingDate)
# Read list of files to run tests on
Files = dir("C:\\CorrelationTests", pattern = "^[T]", full.names=TRUE)
# Create a data.frame with the
A = read.csv(Files[1], header=FALSE)[,c(1,7)]
A[,1] = as.Date(A[,1], format="%m/%d/%Y")
ASum <- with(A,aggregate(V7 ~ V1, FUN = sum))
colnames(ASum) = c("Date","PL")
# Merge the tw...