Learn R Programming

vvconverter (version 0.7.0)

sum_0_1: Sum 0 1

Description

This function is the same as sum(), with one exception: If the outcome value is higher than 1, it will always return 1.

Usage

sum_0_1(x)

Value

0 or 1. Depending on whether the sum is greater than 0 or not.

Arguments

x

a vector with numeric values

See Also

Other vector calculations: academic_year(), clean_multiple_underscores(), interval_round(), month_name(), transform_01_to_ft()