pc_TRUE: pc_TRUE

View source: R/CodeAndRoll2.R

pc_TRUER Documentation

pc_TRUE

Description

Calculates the percentage of true values in a logical vector, parsed as text.

Usage

pc_TRUE(
  logical_vector,
  percentify = TRUE,
  NumberAndPC = FALSE,
  NArm = TRUE,
  prefix = NULL,
  suffix = NULL,
  digitz = 3,
  ...
)

Arguments

logical_vector

A logical vector.

percentify

Whether to return the percentage as a formatted string (default: TRUE).

NumberAndPC

Whether to return the percentage and the number of true values (default: FALSE).

NArm

Whether to ignore NA values (default: TRUE).

prefix

A prefix to add to the output string (default: NULL).

suffix

A suffix to add to the output string (default: NULL).

digitz

The number of decimal places to use when formatting the percentage (default: 3).

...

Additional arguments to pass to percentage_formatter().

Value

A string representing the percentage of true values in the logical vector.


vertesy/CodeAndRoll2 documentation built on Nov. 20, 2024, 5:23 a.m.