[R] difference between "names", "colnames" and "dimnames"

2009-06-30 Thread Germán Bonilla
Hi all... I built a matrix binding vectors with rbind, and have something like this: [,1] [,2][,3] [,4] [,5] [,6] [,7] [,8] CLS 3.877328 4.087636 4.72089 4.038361 3.402942 2.786285 2.671222 3.276419 ORD NaN NaN NaN NaN 5.770780 5.901113 11.

[R] recovering the name of a given value in a matrix

2009-06-17 Thread Germán Bonilla
slice it or something). ANY idea would be of great help. Thanks in advance. Germán Bonilla I.Ecol, UNAM [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the post

[R] function to determine to which class/category a value belongs to?

2009-06-17 Thread Germán Bonilla
gt;0]) 1 3 6 6 1 1 and for the cumulative frequency distribution tabcum <- cumsum(tabsp) 1 3 6 6 7 8 so, If my lower quartile is "2", I can visually determine that it falls into class/category "1" with 6 observations. Is there a function that performs this determination

[R] wrong results when apply+sum with missing values (NA)

2009-06-16 Thread Germán Bonilla
Hi all, I can't compute the sum by columns to a matrix using apply() when I've got missing values (either 0 or NA)... I've got this matrix: >nafam Micro Flavo Helio Pseud Rhodo Bdello Chloro Syntro Verruco Prochloro SAR11 I 1 1 1NANA 1 3 NA 1