generate_random_matrix {TAD} | R Documentation |
Generate random matrix
Description
Generate and save random matrix
Usage
generate_random_matrix(
weights,
aggregation_factor = NULL,
randomization_number,
seed = NULL
)
Arguments
weights |
the dataframe of weights, one row correspond to a series of observation |
aggregation_factor |
the dataframe of factor to take into account for the randomization |
randomization_number |
the number of random abundance matrix to generate |
seed |
the seed of the pseudo random number generator |
Value
a data.frame of randomization_number observations
Examples
aggregation_factor_name <- c("Year", "Bloc")
weights_factor = TAD::AB[, c("Year", "Plot", "Treatment", "Bloc")]
aggregation_factor <- as.data.frame(
weights_factor[, aggregation_factor_name]
)
random_matrix <- TAD::generate_random_matrix(
weights = TAD::AB[, 5:102],
aggregation_factor = aggregation_factor,
randomization_number = 100,
seed = 1312
)
head(random_matrix)
[Package TAD version 1.0.0 Index]