TRUE.Counter.in.vector: Count 'TRUE' in a Vector whose components are all Logical R...

Description Usage Arguments Value Examples

View source: R/the_row_number_of_logical_vector.R

Description

For the posterior predictive p value.

Usage

1
TRUE.Counter.in.vector(vector.logical)

Arguments

vector.logical

vector with logical component

Value

A positive integer.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#========================================================================================
#                         Revised 2019 oct. This is same as sum(), I did not know this
#========================================================================================

 a <-c(TRUE,FALSE,FALSE,TRUE,TRUE)

 TRUE.Counter.in.vector(a)

# Of course, it is:
#> Number.of.TRUE
#  3


sum(a) ==  TRUE.Counter.in.vector(a)

# I did not know this equality,... no longer this function is needed

BayesianFROC documentation built on Jan. 13, 2021, 5:22 a.m.