sumup2binom: Convert from Sum-up Data to Binomial Data

Description Usage Arguments Examples

Description

This function will take binary data (a vector filled with zeros and ones) and transform it into two numbers: pos and ntot, respectfully depicting the amount of positives and the total amount of individuals.

This function will take two numbers: pos and ntot, respectfully depicting the amount of positives and the total amount of individuals, and transform it into binary data. The result is a vector of length ntot with pos amount of ones and ntot-pos amount of zeros.

Usage

1
sumup2binom(pos, ntot)

Arguments

pos

The amount of successes out of “tot” trials.

ntot

The total amount of trials.

Examples

1
2
3
4
5
pos <- 3
ntot <- 10

res <- sumup2binom(pos, ntot)
res

TeaKov/serostat documentation built on May 21, 2019, 1:21 p.m.