Summarizing logical vectors (1)
- Summarizing the whole vector:
any(),all(): return a logicalsum(),mean(): return a numeric
- Summarizing a subset:
- apply a summary function to a subsetted vector
- If
NAvalues are present, the summary result will beNA, BUT theNAvalues can also be ignored with:na.rm = TRUE.