count_up: Count number of unique non-missing observations in a vector

Description Usage Arguments Value Examples

Description

This function tallies up the number of unique observations within a vector. Input vector can be comprised of any data type

Usage

1

Arguments

x

Vector of values to tally up

Value

integer representing number of non-missing values in a vector

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
x = 1:10
count_up(x)

x[c(1,5,7)] = NA
count_up(x)

x = sample(1:5, size = 100, replace = T)
count_up(x)

y = x[x != 5]
count_up(y)

Ajfrick/AVRCHelp documentation built on May 28, 2019, 1:34 a.m.