Displaying 2 results from an estimated 2 matches for "windowlength".
2006 May 12
2
Help In Function
Hi All,
I need a basic help from you. I've built a function like this,
windowlength<-function(x)
{
z <- rep(seq(0,331,by=x-1)+1, each=2)
zz <- z[-c(1,length(z))]
ind <- as.data.frame(matrix(zz, nr=2))
j<-lapply(ind, function(x) mat[x[1]:x[2],])
cat("For",x/4,"...
2006 May 15
1
Object call
Hi All,
I have a function like this:
windowlength<-function(x)
{
mat <- matrix(rnorm(331*12),331,12)
z <- rep(seq(0,331,by=11)+1, each=2)
zz <- z[-c(1,length(z))]
ind <- as.data.frame(matrix(zz, nr=2))
lapply(ind, function(x) mat[x[1]:x[2],])
cat("For",x/4,"month i.e",x,"week, number of windows is = "...