Description Usage Arguments Value Examples
boot_count_vector
returns n
boostrap vectors of
counts. This is basically a multinomial sample with sum(x)
trials
with weights equal x
.
1 2 | boot_count_vector(x, n = 1, depth = NULL, replace_zero = FALSE,
replace_value = 1)
|
x |
(Required) A vector of counts. |
n |
(Optional) Default 1. An integer indicating the number of boostrap count vectors to return. |
depth |
(Optional) Should the count vectors be normalized to a given depth? |
replace_zero |
(Optional) A logical specifying whether to replace zeros in x. |
replace_value |
(Optional) The value to replace zeros with, when replace_zero is TRUE; i.e. we add a small positive weight. Default value is 1. |
A vector or a matrix of n
vectors boostrapped from x
.
1 2 3 4 5 6 7 | boot_count_vector(sample(1:1000, 5))
x <- sample(1:1000, 10)
x[sample(1:length(x), 4)] <- 0
boot_count_vector(x, replace_zero = 0.5)
boot_count_vector(x, depth = 100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.