Learn R Programming

BayesianFROC (version 1.0.0)

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

Description

For the posterior predictive p value.

Usage

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

Arguments

vector.logical

vector with logical component

Value

A positive integer.

Examples

Run this code
# NOT RUN {
#========================================================================================
#                         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


# }

Run the code above in your browser using DataLab