? Seq criteria
1? 1? ? ? ? c
2? 2? ? ? ? e
3? 3? ? ? ? c
4? 4? ? ? ? c
5? 5? ? ? ? d
Now I want to get the column-sums of 'mat' based on the unique
elements of match_df[,'criteria']
Therefore based on the 'match_df', my resulting matrix will have 3
rows (because the unique elements here are 'c, e, & d'). And.........
1st row will be column sums for mat[c(1,3,4), ]
2nd row will be column sums for mat[c(2), ]
3rd row will be column sums for mat[c(5), ]
I want to get a general framework, so that I can implement that in
some big arbitrary matrix.
Can somebody give me some pointer?
Thanks and regards,
______________________________________________
R-help at 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.