Learn R Programming

pacheck (version 0.2.2)

check_binary: Check binary

Description

This function tests whether the value of variables remain between 0 and 1 (for instance for utility and probability inputs)

Usage

check_binary(..., df, max_view = 50)

Value

A dataframe.

Arguments

...

character vector. This character vector contains the name of the variables of which the sum will be checked.

df

a dataframe.

max_view

numeric. Determines the number of iterations to display which do not fulfill the check. Default is 50.

Examples

Run this code
# Checking whether a variable is strictly positive
data(df_pa)
check_binary("u_pfs", df = df_pa)
# Checking whether two variables are strictly positive
# Decreasing the number of iterations to display to 20.
check_binary("u_pfs", "p_pfspd", df = df_pa)

Run the code above in your browser using DataLab