get_bottom_vector: Given a vector and set of steps, use rmvhyper to make a new...

View source: R/rtisan.r

get_bottom_vectorR Documentation

Given a vector and set of steps, use rmvhyper to make a new vector.

Description

This takes an input vector and for every element of it provides a new element which is calculated by doing the following: 1. Run rmvhyper on the original vector in order to generate a set of random numbers using the multivariate hypergeometric distribution. 2. Finding the number of values from #1 which are not 0. 3. Putting the number from #2 into the new element. 4. Finally, returns the new vector.

Usage

get_bottom_vector(vector, steps)

Arguments

vector

input vector

steps

Set of steps over which to iterate.

Details

It seems to me that there must be a much more efficient way to get this information?

Value

New vector containing the number of times the rhvhyper distribution was not zero for each element of the original vector.


abelew/stampr documentation built on April 14, 2022, 5:03 a.m.