#' Plots summary statistics for distances between sequences
#' @param summary_table The data returned by a simulation
#' @importFrom magrittr "%>%"
#' @export
plot_summary_stats <- function(summary_table, timejump = 10^6)
{
p <- ggplot2::ggplot(data = summary_table,
ggplot2::aes(x = time))
p <- p + ggplot2::geom_line(ggplot2::aes(y = mean_dist, color = num_seq))
p <- p + ggplot2::labs(x = paste0("time (in ", timejump, " years)"), y = "mean pairwise sequence distance",
title = "Mean pairwise distance over time")
p <- p + ggplot2::guides(color=ggplot2::guide_legend(title="Number of sequences"))
return(p)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.