Hi Henrik, My sessionInfo() is:
R version 2.10.1 (2009-12-14) i386-pc-mingw32 locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] bioDist_1.18.0 KernSmooth_2.23-3 ygs98cdf_2.5.0 affy_1.24.2 [5] Biobase_2.6.1 loaded via a namespace (and not attached): [1] affyio_1.14.0 preprocessCore_1.8.0 tools_2.10.1 David, the use of "drop=FALSE" seems to solve the problem > a = x[1,,drop=FALSE] > a GSM1.CEL GSM2.CEL GSM3.CEL 10000_at 3 3 1 | -----> Keep the matrix (does not decrease the dimension) > b = 3 > a==b GSM1.CEL GSM2.CEL GSM3.CEL 10000_at TRUE TRUE FALSE > colProds(a==b) GSM1.CEL GSM2.CEL GSM3.CEL 1 1 0 > sum(colProds(a==b)) [1] 2 Thank you very much for both replies. Pablo. -- View this message in context: http://r.789695.n4.nabble.com/Rows-index-colProds-tp2325771p2329337.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.