contains: Contains i

Description Usage Arguments Value Author(s) Examples

Description

Computes and returns all numbers that as binary numbers of length m that have a 1 at the i-th position. Can be used to represent intersection hypotheses for efficient implementation of closed testing procedures.

Usage

1
contains(i, m)

Arguments

i

position

m

number of digits

Value

integer vector

Author(s)

Florian Klinglmueller

Examples

1
2
3
4
5
6
7
## which binary numbers (of length 3) have a 1 at the 3rd position
out <- contains(3,3)
out
## check if true
bins <- lapply(out,to.binom,3)
bins
all(lapply(bins,`[`,3) == 1)

floatofmath/resamplingMCP documentation built on May 16, 2019, 1:21 p.m.