Dear Rxperts Below is a small vector of values of zeros and non-zeros... was wondering if there is an efficient way to get the block sizes of submatrices of a big matrix similar to the one shown below? diagonal elements can be zero too. Rows with only a diagonal element may be considered as a unit block size.
c(1,0,0,0,0,0,0,0,0,0,0, 1,1,0,0,0,0,0,0,0,0,0, 0,0,1,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,1,0,0,0,0,0,0, 0,0,0,0,1,1,0,0,0,0,0, 0,0,0,0,1,1,1,0,0,0,0, 0,0,0,0,0,0,0,1,0,0,0, 0,0,0,0,0,0,0,1,1,0,0, 0,0,0,0,0,0,0,1,1,1,0, 0,0,0,0,0,0,0,0,0,0,0) Thanks much! Santosh [[alternative HTML version deleted]] ______________________________________________ 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.