Thanks to Peter and Gabriel for their comments,

The first way which Peter commented was my first approach, however as I use
it for a 'large' matrix (in my case nrow = ncol = 512) and I want to split
it into very small matrices (e.g. nrow = ncol = {4, 8, 16}) both nested
loops I think are a quite expensive and that's why I was looking for a
better way.

The Gabor's approach works perfect for my needs, thanks :)

--
View this message in context: 
http://r.789695.n4.nabble.com/Split-matrix-into-square-submatices-tp4375563p4376952.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.

Reply via email to