generate_random_matrix | R Documentation |
Generate and save random matrix
generate_random_matrix(
weights,
aggregation_factor = NULL,
randomization_number,
seed = NULL
)
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 |
a data.frame of randomization_number observations
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.