checkN: Check validity of n

Description Usage Arguments Value

View source: R/utilities-input-validation.R

Description

n(s) should always be a positive whole number, check the user's input

Usage

1
checkN(n, expectedLength = 1, emptyOkay = FALSE)

Arguments

n

the input n (often number of data points in data set) from the user, or an array of n's from the user

expectedLength

Positive integer. The expected length of n.

emptyOkay

A boolean. True if NA or NULL values are allowed, FALSE otherwise.

Value

n, if n is a series of positive integers with expected length and only containing NAs or NULL values if allowed.


privacytoolsproject/PSI-Library documentation built on Feb. 17, 2020, 2:03 p.m.