# Npct: Combine count with a percent In cursory: A Cursory Look at Variables

## Description

Combine count with a percent

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13``` ```Npct(x, n, ...) ## S4 method for signature 'logical,missing' Npct(x, n, ...) ## S4 method for signature 'logical,logical' Npct(x, n, ...) ## S4 method for signature 'integer,integer' Npct(x, n, ...) ## S4 method for signature 'numeric,numeric' Npct(x, n, ...) ```

## Arguments

 `x` count or object to count `n` see methods. `...` formatting arguments for formatting the percent. See format.percent.

## Value

A character vector formatted with number and percent of successes.

## Methods (by class)

• `x = logical,n = missing`: Count and give percent of `TRUE` from a logical vector.

• `x = logical,n = logical`: Count and percent of a logical filtered by a second logical.

• `x = integer,n = integer`: Provided with count(s) of cases and total(s)

• `x = numeric,n = numeric`: Provided the actual count and the percent.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11``` ```# Vector of cases only. Npct(c(TRUE, FALSE, TRUE)) # Cases with indices Npct( c(TRUE,FALSE,TRUE,FALSE,TRUE), c(TRUE,TRUE,TRUE,FALSE,FALSE)) # Successes/Total Npct(2L, 3L) # Count + percent directly, count must be integerish. Npct(2, 2/3) ```

cursory documentation built on Aug. 22, 2019, 9:03 a.m.