#' Plot sample populations
#'
#' @param population
#' @param q
#' @param sample.size
#'
#' @return
#' @export
#'
#' @examples
plot_subsamples5 <- function(population, q, sample.size) {
popdq <- multi_q_diversity4(population, q)
plot(q, popdq, type = 'l', col = "red", ylab = 'Dq')
for(i in 1:20){
# we define a dataframe which will contain our model results
small.populations <-
sample_by_individuals(population, sample.size)
small.diversity <-
multi_q_diversity4(small.populations, q)
# plot our results
lines(q, small.diversity)
# change new.graph to false, so that each subsequnt run of the function after the first will produce a
# new line on the same image
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.