[R] If then test
claytonmccandless
claytonmccandless at msn.com
Thu Jan 28 09:21:31 CET 2010
close,
So I have a vector, lets say
[1] 1.5 1.2
And a matrix
[,1] [,2]
[1,] 1.9 1.3
[2,]-.2 2
I want to somehow use the first number in my vector(1.5) and compare this
number to my whole first column. So I want to see how many times the numbers
in column 1<1.5 which should be 1 in this case. Now for the other number, we
compare 1.2. We get 0. So I need a vector to have these results like
[1] 1 0
--
View this message in context: http://n4.nabble.com/If-then-test-tp1322119p1336898.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list