R/plot_subsamples5.R

Defines functions plot_subsamples5

Documented in plot_subsamples5

#' 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
  }
}
EdieBishop/ProgInRBCIfunc documentation built on Dec. 23, 2019, 10:16 p.m.