Hi,
I feel dumb even asking, but isn't there an R function somewhere that I
can use to reduce the resolution of a vector (or matrix) by summing
terms in uniform blocks? That is, for a vector X, reduce it to some
X.short as X.short[1]<- sum(X[1:10]); X.short[2] <- sum(X[11:20]), and
so on.
I did the following:
X.short<-colSums(matrix(X,16,2048/16)) # X is of length 2048
but surely there's already a function somewhere that does this in a
more general case? And, my approach will get a bit painful for reducing
a matrix in both dimensions.
Carl
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.