powered by
This function finds number of elements which are TRUE in a logical vector
how.many(x)
A non-negative integer of length 1.
A logical vector
Baidya Nath Mandal <mandal.stat@gmail.com>
x <- c(1,-1,1,-1,1,-1) how.many(x == -1) how.many(seq(1,7,2) == 3)
Run the code above in your browser using DataLab