r count true code example
Example: how to count the true values in r
a = c(NA,T,F,F)
sum(a, na.rm=TRUE) # best way to count TRUE values #which gives 1.
a = c(NA,T,F,F)
sum(a, na.rm=TRUE) # best way to count TRUE values #which gives 1.